From 2d02671d65ec27fc9153eee4ba8a6d5876487779 Mon Sep 17 00:00:00 2001 From: oheunchan07 <131967057+oheunchan07@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:33:52 +0900 Subject: [PATCH 1/3] =?UTF-8?q?textfield=20=EB=8B=A8=EC=9C=84=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jds_component/textField/JDSTextField.kt | 21 +++++++++++++++++++ .../jds_component/typography/JDSTypography.kt | 1 - 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt b/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt index 75d5b2b..09e64e4 100644 --- a/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt +++ b/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt @@ -37,10 +37,12 @@ fun JDSTextField( textFieldInfo: String, textState: String, textFieldOutlineColor: Color, + stockUnitText:String = "", isEnabled: Boolean = true, isError: Boolean = false, supportText: String = "", supportTextClick: Boolean = false, + sellStock: Boolean = false, visualTransformation: VisualTransformation = VisualTransformation.None, onTextChange: (String) -> Unit, onClickSupportText: () -> Unit = {} @@ -97,7 +99,14 @@ fun JDSTextField( Text( text = textFieldInfo, color = if (textState.isEmpty()) JDSColor.GRAY2 else JDSColor.Black, + style = JDSTypography.bodySmall + ) + } else if(sellStock) { + Text( + text = stockUnitText, + color = JDSColor.GRAY300, style = JDSTypography.bodySmall, + modifier = Modifier.align(Alignment.End) ) } } @@ -195,5 +204,17 @@ fun JDSTextFieldPreview() { supportTextClick = true, onClickSupportText = {} ) + + JDSTextField( + modifier = Modifier.width(312.dp), + label = "아이디", + textFieldInfo = "아이디를 입력해주세요", + textFieldOutlineColor = JDSColor.GRAY100, + supportText = "이메일 수정하기", + textState = textState, + onTextChange = onTextChange, + sellStock = true, + stockUnitText = "주" + ) } } diff --git a/JDS-component/src/main/java/com/jusiCool/jds_component/typography/JDSTypography.kt b/JDS-component/src/main/java/com/jusiCool/jds_component/typography/JDSTypography.kt index 8e4bffe..b6c8c36 100644 --- a/JDS-component/src/main/java/com/jusiCool/jds_component/typography/JDSTypography.kt +++ b/JDS-component/src/main/java/com/jusiCool/jds_component/typography/JDSTypography.kt @@ -1,6 +1,5 @@ package com.jusiCool.jds_component.typography -import androidx.compose.material3.Typography import androidx.compose.runtime.Stable import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.Font From ee9fa958bd8eb1e450bf8fab1351298f72756afd Mon Sep 17 00:00:00 2001 From: oheunchan07 <131967057+oheunchan07@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:49:14 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EB=B3=80=EC=88=98=20=EC=9D=B4=EB=A6=84=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 --- .../jds_component/textField/JDSTextField.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt b/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt index 09e64e4..95c3622 100644 --- a/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt +++ b/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt @@ -34,7 +34,7 @@ import com.jusiCool.jds_component.typography.JDSTypography fun JDSTextField( modifier: Modifier = Modifier, label: String, - textFieldInfo: String, + placeHolder: String, textState: String, textFieldOutlineColor: Color, stockUnitText:String = "", @@ -97,7 +97,7 @@ fun JDSTextField( ) { if (textState.isEmpty()) { Text( - text = textFieldInfo, + text = placeHolder, color = if (textState.isEmpty()) JDSColor.GRAY2 else JDSColor.Black, style = JDSTypography.bodySmall ) @@ -137,7 +137,7 @@ fun JDSTextFieldPreview() { JDSTextField( modifier = Modifier.width(312.dp), label = "아이디", - textFieldInfo = "아이디를 입력해주세요", + placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.GRAY100, textState = textState, onTextChange = onTextChange @@ -146,7 +146,7 @@ fun JDSTextFieldPreview() { JDSTextField( modifier = Modifier.width(312.dp), label = "아이디", - textFieldInfo = "아이디를 입력해주세요", + placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.MAIN, textState = textState, onTextChange = onTextChange @@ -155,7 +155,7 @@ fun JDSTextFieldPreview() { JDSTextField( modifier = Modifier.width(312.dp), label = "아이디", - textFieldInfo = "아이디를 입력해주세요", + placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.GRAY200, isEnabled = false, textState = textState, @@ -165,7 +165,7 @@ fun JDSTextFieldPreview() { JDSTextField( modifier = Modifier.width(312.dp), label = "아이디", - textFieldInfo = "아이디를 입력해주세요", + placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.ERROR, supportText = "Error", isError = true, @@ -176,7 +176,7 @@ fun JDSTextFieldPreview() { JDSTextField( modifier = Modifier.width(312.dp), label = "아이디", - textFieldInfo = "아이디를 입력해주세요", + placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.GRAY100, textState = textState, onTextChange = onTextChange, @@ -186,7 +186,7 @@ fun JDSTextFieldPreview() { JDSTextField( modifier = Modifier.width(312.dp), label = "아이디", - textFieldInfo = "아이디를 입력해주세요", + placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.ERROR, supportText = "영문, 숫자, 특수문자 중 2개 이상의 조합으로 8글자 이상", textState = textState, @@ -196,7 +196,7 @@ fun JDSTextFieldPreview() { JDSTextField( modifier = Modifier.width(312.dp), label = "아이디", - textFieldInfo = "아이디를 입력해주세요", + placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.ERROR, supportText = "이메일 수정하기", textState = textState, @@ -208,7 +208,7 @@ fun JDSTextFieldPreview() { JDSTextField( modifier = Modifier.width(312.dp), label = "아이디", - textFieldInfo = "아이디를 입력해주세요", + placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.GRAY100, supportText = "이메일 수정하기", textState = textState, From 610cbfb2118dbdc83d1dab5757942f85ff62c21b Mon Sep 17 00:00:00 2001 From: oheunchan07 <131967057+oheunchan07@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:57:11 +0900 Subject: [PATCH 3/3] =?UTF-8?q?preview=20modify=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jds_component/textField/JDSTextField.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt b/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt index 95c3622..e4a195b 100644 --- a/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt +++ b/JDS-component/src/main/java/com/jusiCool/jds_component/textField/JDSTextField.kt @@ -135,7 +135,7 @@ fun JDSTextFieldPreview() { Column { JDSTextField( - modifier = Modifier.width(312.dp), + modifier = Modifier.fillMaxWidth(), label = "아이디", placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.GRAY100, @@ -144,7 +144,7 @@ fun JDSTextFieldPreview() { ) JDSTextField( - modifier = Modifier.width(312.dp), + modifier = Modifier.fillMaxWidth(), label = "아이디", placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.MAIN, @@ -153,7 +153,7 @@ fun JDSTextFieldPreview() { ) JDSTextField( - modifier = Modifier.width(312.dp), + modifier = Modifier.fillMaxWidth(), label = "아이디", placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.GRAY200, @@ -163,7 +163,7 @@ fun JDSTextFieldPreview() { ) JDSTextField( - modifier = Modifier.width(312.dp), + modifier = Modifier.fillMaxWidth(), label = "아이디", placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.ERROR, @@ -174,7 +174,7 @@ fun JDSTextFieldPreview() { ) JDSTextField( - modifier = Modifier.width(312.dp), + modifier = Modifier.fillMaxWidth(), label = "아이디", placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.GRAY100, @@ -184,7 +184,7 @@ fun JDSTextFieldPreview() { ) JDSTextField( - modifier = Modifier.width(312.dp), + modifier = Modifier.fillMaxWidth(), label = "아이디", placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.ERROR, @@ -194,7 +194,7 @@ fun JDSTextFieldPreview() { ) JDSTextField( - modifier = Modifier.width(312.dp), + modifier = Modifier.fillMaxWidth(), label = "아이디", placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.ERROR, @@ -206,7 +206,7 @@ fun JDSTextFieldPreview() { ) JDSTextField( - modifier = Modifier.width(312.dp), + modifier = Modifier.fillMaxWidth(), label = "아이디", placeHolder = "아이디를 입력해주세요", textFieldOutlineColor = JDSColor.GRAY100,