From 836dc10c371f44c2f4891b0ddbc0d169c66eb4b7 Mon Sep 17 00:00:00 2001 From: jinukeu Date: Thu, 8 Feb 2024 19:32:52 +0900 Subject: [PATCH] =?UTF-8?q?design:=20SusuTextFieldButton=20=EC=BB=A4?= =?UTF-8?q?=EC=84=9C=20=EB=A0=88=EC=9D=B4=EC=96=B4=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../textfieldbutton/SusuTextFieldButton.kt | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/core/designsystem/src/main/java/com/susu/core/designsystem/component/textfieldbutton/SusuTextFieldButton.kt b/core/designsystem/src/main/java/com/susu/core/designsystem/component/textfieldbutton/SusuTextFieldButton.kt index 75f81029..07d0cb4f 100644 --- a/core/designsystem/src/main/java/com/susu/core/designsystem/component/textfieldbutton/SusuTextFieldButton.kt +++ b/core/designsystem/src/main/java/com/susu/core/designsystem/component/textfieldbutton/SusuTextFieldButton.kt @@ -114,10 +114,6 @@ fun SusuTextFieldFillMaxButton( modifier = Modifier.weight(1f), contentAlignment = Alignment.Center, ) { - if (isSaved.not()) { - innerTextField() - } - /** * Problem : innerTextField 수정 중에 saved가 되면 underline이 생기는 현상. * Solution : saved 상태에서는 Text 컴포저블 함수가 보이게 함. @@ -145,6 +141,10 @@ fun SusuTextFieldFillMaxButton( minLines = minLines, ) } + + if (isSaved.not()) { + innerTextField() + } } InnerButtons( @@ -213,6 +213,18 @@ fun SusuTextFieldWrapContentButton( Box( contentAlignment = Alignment.Center, ) { + if (text.isEmpty()) { + Text( + text = placeholder, + color = color.placeholderColor, + style = textStyle, + textAlign = TextAlign.Center, + overflow = overflow, + maxLines = maxLines, + minLines = minLines, + ) + } + BasicTextField( modifier = Modifier .disabledHorizontalPointerInputScroll() @@ -254,18 +266,6 @@ fun SusuTextFieldWrapContentButton( innerTextField() }, ) - - if (text.isEmpty()) { - Text( - text = placeholder, - color = color.placeholderColor, - style = textStyle, - textAlign = TextAlign.Center, - overflow = overflow, - maxLines = maxLines, - minLines = minLines, - ) - } } InnerButtons(