From f03976b7981bbc5266dafc0c442aa46aa1cb53c0 Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Fri, 16 Feb 2024 19:06:46 +0900 Subject: [PATCH] =?UTF-8?q?[REFACTOR]=20#125=20:=20=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=82=A4=EB=B3=B4=EB=93=9C=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=20=EB=88=84=EB=A5=B4=EB=A9=B4=20=ED=82=A4?= =?UTF-8?q?=EB=B3=B4=EB=93=9C=20=EC=88=A8=EA=B8=B0=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/wap/designsystem/component/TextField.kt | 10 ++++++++++ .../wap/wapp/feature/auth/signup/SignUpTextField.kt | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/core/designsystem/src/main/java/com/wap/designsystem/component/TextField.kt b/core/designsystem/src/main/java/com/wap/designsystem/component/TextField.kt index d389ebb4..619d7a0f 100644 --- a/core/designsystem/src/main/java/com/wap/designsystem/component/TextField.kt +++ b/core/designsystem/src/main/java/com/wap/designsystem/component/TextField.kt @@ -2,12 +2,17 @@ package com.wap.designsystem.component import androidx.annotation.StringRes import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material3.Text import androidx.compose.material3.TextField import androidx.compose.material3.TextFieldDefaults import androidx.compose.runtime.Composable +import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.unit.dp import com.wap.designsystem.WappTheme @@ -46,6 +51,7 @@ fun WappTextField( ) } +@OptIn(ExperimentalComposeUiApi::class) @Composable fun WappRoundedTextField( value: String, @@ -53,6 +59,8 @@ fun WappRoundedTextField( modifier: Modifier = Modifier, @StringRes placeholder: Int, ) { + val keyboardController = LocalSoftwareKeyboardController.current + TextField( value = value, onValueChange = onValueChange, @@ -72,6 +80,8 @@ fun WappRoundedTextField( color = WappTheme.colors.gray82, ) }, + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), + keyboardActions = KeyboardActions(onDone = { keyboardController?.hide() }), shape = RoundedCornerShape(10.dp), ) } diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpTextField.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpTextField.kt index 8a72caa6..ff6245a1 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpTextField.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpTextField.kt @@ -42,13 +42,16 @@ internal fun SignUpTextField( tint = WappTheme.colors.white, modifier = Modifier.size(20.dp), ) + Spacer(modifier = Modifier.width(8.dp)) + Text( text = title, color = WappTheme.colors.white, style = WappTheme.typography.contentBold, ) } + TextField( value = text, onValueChange = onValueChanged, @@ -66,7 +69,9 @@ internal fun SignUpTextField( keyboardOptions = keyboardOptions, keyboardActions = keyboardActions, ) + Spacer(modifier = Modifier.height(8.dp)) + Text( text = supportingText, color = WappTheme.colors.yellow34,