From 108bf74d4e0daa87c6b7fcedb476a4a532375639 Mon Sep 17 00:00:00 2001 From: evergreen Date: Thu, 26 Sep 2024 22:58:29 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]=20@Jasunglee=20@ze-zeh=20=EB=A6=AC?= =?UTF-8?q?=EB=B7=B0=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/textfield/FarmemeTextField.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/core/designsystem/src/main/kotlin/team/ppac/designsystem/component/textfield/FarmemeTextField.kt b/core/designsystem/src/main/kotlin/team/ppac/designsystem/component/textfield/FarmemeTextField.kt index 42444301..3c2e74f2 100644 --- a/core/designsystem/src/main/kotlin/team/ppac/designsystem/component/textfield/FarmemeTextField.kt +++ b/core/designsystem/src/main/kotlin/team/ppac/designsystem/component/textfield/FarmemeTextField.kt @@ -1,6 +1,7 @@ package team.ppac.designsystem.component.textfield import androidx.compose.foundation.background +import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -32,11 +33,12 @@ fun FarmemeTextField( modifier: Modifier = Modifier, text: String, placeholder: String = "", - trailingContent: @Composable () -> Unit = {}, - onTextChanged: (String) -> Unit, enabled: Boolean = true, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, + onTextChanged: (String) -> Unit, + trailingContent: @Composable () -> Unit = {}, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, ) { BasicTextField( modifier = modifier, @@ -46,6 +48,7 @@ fun FarmemeTextField( keyboardOptions = keyboardOptions, keyboardActions = keyboardActions, singleLine = true, + interactionSource = interactionSource, decorationBox = { innerTextField -> Box( modifier = Modifier @@ -85,13 +88,14 @@ fun FarmemeTextArea( modifier: Modifier = Modifier, text: String, placeholder: String = "", - trailingContent: @Composable () -> Unit = {}, - onTextChanged: (String) -> Unit = {}, enabled: Boolean = true, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, singleLine: Boolean = false, maxLines: Int = Int.MAX_VALUE, + onTextChanged: (String) -> Unit = {}, + trailingContent: @Composable () -> Unit = {}, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, ) { BasicTextField( modifier = modifier, @@ -102,6 +106,7 @@ fun FarmemeTextArea( keyboardActions = keyboardActions, singleLine = singleLine, maxLines = maxLines, + interactionSource = interactionSource, decorationBox = { innerTextField -> Box( modifier = Modifier