Skip to content

Commit

Permalink
[FEATURE] #141 : WAP 회원 코드 설정 Dialog UI 개선
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Feb 27, 2024
1 parent 2f9be2b commit 95f7f2a
Showing 1 changed file with 46 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import com.wap.designsystem.WappTheme
import com.wap.designsystem.component.WappButton
import com.wap.designsystem.component.WappTextField
Expand All @@ -28,46 +31,54 @@ internal fun CodeValidationDialog(
) {
Dialog(
onDismissRequest = onDismissRequest,
properties = DialogProperties(
usePlatformDefaultWidth = false,
),
) {
Card(shape = RoundedCornerShape(10.dp)) {
Column(
modifier = Modifier
.fillMaxWidth()
.background(color = WappTheme.colors.black25)
.padding(10.dp),
) {
Text(
text = stringResource(R.string.sign_up_dialog_title),
style = WappTheme.typography.titleBold,
color = WappTheme.colors.white,
textAlign = TextAlign.Center,
)
Column(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.wrapContentHeight()
.fillMaxWidth()
.padding(horizontal = 30.dp, vertical = 20.dp)
.clip(RoundedCornerShape(10.dp))
.background(WappTheme.colors.black25),
) {
Text(
text = stringResource(R.string.sign_up_dialog_title),
style = WappTheme.typography.titleBold,
color = WappTheme.colors.white,
textAlign = TextAlign.Center,
modifier = Modifier.padding(top = 20.dp),
)

Text(
text = stringResource(R.string.sign_up_dialog_content),
style = WappTheme.typography.captionMedium,
color = WappTheme.colors.white,
textAlign = TextAlign.Center,
)
Text(
text = stringResource(R.string.sign_up_dialog_content),
style = WappTheme.typography.captionMedium,
color = WappTheme.colors.white,
textAlign = TextAlign.Center,
modifier = Modifier.padding(top = 10.dp),
)

Spacer(modifier = Modifier.padding(vertical = 8.dp))
Spacer(modifier = Modifier.padding(vertical = 10.dp))

WappTextField(
value = code,
onValueChanged = setValidationCode,
label = R.string.code,
isError = false,
supportingText = "",
)
WappTextField(
value = code,
onValueChanged = setValidationCode,
label = R.string.code,
isError = false,
supportingText = "",
)

Spacer(modifier = Modifier.padding(vertical = 8.dp))
Spacer(modifier = Modifier.padding(vertical = 10.dp))

WappButton(
onClick = onConfirmRequest,
isEnabled = code.isNotBlank(),
modifier = Modifier.padding(horizontal = 32.dp),
)
}
WappButton(
onClick = onConfirmRequest,
isEnabled = code.isNotBlank(),
modifier = Modifier
.fillMaxWidth()
.padding(20.dp),
)
}
}
}

0 comments on commit 95f7f2a

Please sign in to comment.