From 4eb45addc0c9d0e693714fe01ef8b9525a8f3cdc Mon Sep 17 00:00:00 2001 From: easyhz Date: Fri, 19 Jul 2024 23:32:51 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20checkButton=20=ED=8C=8C=EB=9D=BC?= =?UTF-8?q?=EB=AF=B8=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/design_system/component/button/CheckButton.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/button/CheckButton.kt b/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/button/CheckButton.kt index 4ce74ff5..6914b54b 100644 --- a/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/button/CheckButton.kt +++ b/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/button/CheckButton.kt @@ -17,6 +17,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.easyhz.noffice.core.design_system.R @@ -38,6 +39,7 @@ import com.easyhz.noffice.core.design_system.theme.Grey600 @Composable fun CheckButton( modifier: Modifier = Modifier, + textAlign: TextAlign = TextAlign.Start, text: String, isComplete: Boolean, color: CheckButtonDefaults = CheckButtonDefaults.default(), @@ -61,7 +63,8 @@ fun CheckButton( modifier = Modifier.weight(1f), text = text, color = if(isComplete) color.completeContentColor else color.incompleteContentColor, - style = Body14 + style = Body14, + textAlign = textAlign ) if ((isComplete && color.completeIconColor != null) || color.incompleteIconColor != null) { Icon( @@ -189,7 +192,7 @@ private fun CheckButtonOrganizationCompletePrev() { @Preview(group = "checkButton", name = "organization - complete") @Composable -private fun CheckButtonOrganizationCompletePrev2() { +private fun CheckButtonOrganizationCompleteNullPrev() { CheckButton( modifier = Modifier.width(300.dp), text = "CMC 15th",