From 8cb38510dfdd02e3b0ea49a772ec096aefb91cda Mon Sep 17 00:00:00 2001 From: sssuhha Date: Mon, 12 Jan 2026 23:03:31 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[FEAT/#38]=20=EC=8B=9C=EC=88=A0=20=EB=B7=B0?= =?UTF-8?q?=20=EA=B3=B5=ED=86=B5=20SelectionSection=20=EA=B5=AC=ED=98=84?= =?UTF-8?q?=1C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../procedure/component/SelectionSection.kt | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt diff --git a/app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt b/app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt new file mode 100644 index 000000000..73f9d67a1 --- /dev/null +++ b/app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt @@ -0,0 +1,131 @@ +package com.cherrish.android.presentation.calendar.procedure.component + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.grid.itemsIndexed +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.cherrish.android.core.designsystem.component.chip.CherrishSelectionChip +import com.cherrish.android.core.designsystem.theme.CherrishTheme + +@Composable +fun SelectionSection( + title: String, + items: List, + modifier: Modifier = Modifier, + description: String? = null, + selectedIndex: Int? = null, + onItemClick: (index: Int) -> Unit +) { + Column( + modifier = modifier.fillMaxWidth() + ) { + TitleDescriptionSection( + title = title, + description = description + ) + + Spacer(modifier = Modifier.height(40.dp)) + + SelectionChipGrid( + items = items, + selectedIndex = selectedIndex, + onItemClick = onItemClick + ) + } +} + +@Composable +fun SelectionChipGrid( + items: List, + modifier: Modifier = Modifier, + selectedIndex: Int? = null, + onItemClick: (index: Int) -> Unit +) { + LazyVerticalGrid( + modifier = modifier.fillMaxWidth(), + columns = GridCells.Fixed(2), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalArrangement = Arrangement.spacedBy(12.dp), + userScrollEnabled = false + ) { + itemsIndexed(items) { index, text -> + CherrishSelectionChip( + text = text, + onClick = { onItemClick(index) }, + modifier = Modifier.fillMaxWidth(), + isSelected = selectedIndex == index + ) + } + } +} + +@Composable +private fun TitleDescriptionSection( + title: String, + modifier: Modifier = Modifier, + description: String? = null +) { + Column( + modifier = modifier.fillMaxWidth() + ) { + Text( + text = title, + style = CherrishTheme.typography.title1SB18, + color = CherrishTheme.colors.gray1000 + ) + + if (!description.isNullOrBlank()) { + Spacer(modifier = Modifier.height(4.dp)) + Text( + text = description, + style = CherrishTheme.typography.body1R14, + color = CherrishTheme.colors.gray700 + ) + } + } +} + +@Preview(showBackground = true) +@Composable +private fun SelectionGridSectionPreview_TwoOptions() { + CherrishTheme { + var isSelected by remember { mutableIntStateOf(-1) } + + SelectionSection( + title = "시술 일정을 추가해볼게요.\n이미 생각해둔 시술이 있나요?", + description = "시술을 선택하셨는지 확인할게요.", + items = listOf("선택한 시술이 있어요", "아직 선택 전이에요"), + selectedIndex = isSelected, + onItemClick = { isSelected = it } + ) + } +} + +@Preview(showBackground = true) +@Composable +private fun SelectionGridSectionPreview_SixOptions() { + CherrishTheme { + var isSelected by remember { mutableIntStateOf(-1) } + + SelectionSection( + title = "요즘 가장 신경 쓰이는\n피부 고민은 무엇인가요?", + description = "선택한 고민 기준으로 시술 정보를 정리해드려요.", + items = listOf("피부결·각질", "색소·잡티", "홍조", "탄력·주름", "모공", "트러블"), + selectedIndex = isSelected, + onItemClick = { isSelected = it } + ) + } +} From 5593bd731f3e0319a21752fe3c0a6881f5be86a4 Mon Sep 17 00:00:00 2001 From: sssuhha Date: Mon, 12 Jan 2026 23:09:44 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[CHORE/#38]=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=ED=8C=A8=ED=82=A4?= =?UTF-8?q?=EC=A7=80=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/section/CherrishSelectionSection.kt} | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename app/src/main/java/com/cherrish/android/{presentation/calendar/procedure/component/SelectionSection.kt => core/designsystem/component/section/CherrishSelectionSection.kt} (92%) diff --git a/app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt similarity index 92% rename from app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt rename to app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt index 73f9d67a1..bb630a18b 100644 --- a/app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt @@ -1,4 +1,4 @@ -package com.cherrish.android.presentation.calendar.procedure.component +package com.cherrish.android.core.designsystem.component.section import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -21,7 +21,7 @@ import com.cherrish.android.core.designsystem.component.chip.CherrishSelectionCh import com.cherrish.android.core.designsystem.theme.CherrishTheme @Composable -fun SelectionSection( +fun CherrishSelectionSection( title: String, items: List, modifier: Modifier = Modifier, @@ -48,7 +48,7 @@ fun SelectionSection( } @Composable -fun SelectionChipGrid( +private fun SelectionChipGrid( items: List, modifier: Modifier = Modifier, selectedIndex: Int? = null, @@ -100,11 +100,11 @@ private fun TitleDescriptionSection( @Preview(showBackground = true) @Composable -private fun SelectionGridSectionPreview_TwoOptions() { +private fun CherrishSelectionSectionPreview_TwoOptions() { CherrishTheme { var isSelected by remember { mutableIntStateOf(-1) } - SelectionSection( + CherrishSelectionSection( title = "시술 일정을 추가해볼게요.\n이미 생각해둔 시술이 있나요?", description = "시술을 선택하셨는지 확인할게요.", items = listOf("선택한 시술이 있어요", "아직 선택 전이에요"), @@ -116,11 +116,11 @@ private fun SelectionGridSectionPreview_TwoOptions() { @Preview(showBackground = true) @Composable -private fun SelectionGridSectionPreview_SixOptions() { +private fun CherrishSelectionSectionPreview_SixOptions() { CherrishTheme { var isSelected by remember { mutableIntStateOf(-1) } - SelectionSection( + CherrishSelectionSection( title = "요즘 가장 신경 쓰이는\n피부 고민은 무엇인가요?", description = "선택한 고민 기준으로 시술 정보를 정리해드려요.", items = listOf("피부결·각질", "색소·잡티", "홍조", "탄력·주름", "모공", "트러블"), From b601ed0d6729613d14fd024ace34642bebc82d67 Mon Sep 17 00:00:00 2001 From: sssuhha Date: Mon, 12 Jan 2026 23:52:43 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[FEAT/#38]=20SelectionSection=EC=97=90=20?= =?UTF-8?q?=EC=B9=A9=20=ED=83=80=EC=9E=85=20=EC=84=A0=ED=83=9D=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../section/CherrishSelectionSection.kt | 66 +++++++++++++------ 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt index bb630a18b..1cc1d8917 100644 --- a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt @@ -17,17 +17,24 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.cherrish.android.core.designsystem.component.chip.CherrishMissionCard import com.cherrish.android.core.designsystem.component.chip.CherrishSelectionChip import com.cherrish.android.core.designsystem.theme.CherrishTheme +enum class CherrishSectionChipType { + SELECTION_CHIP, + MISSION_CARD +} + @Composable fun CherrishSelectionSection( title: String, items: List, + chipType: CherrishSectionChipType, + onItemClick: (index: Int) -> Unit, modifier: Modifier = Modifier, description: String? = null, - selectedIndex: Int? = null, - onItemClick: (index: Int) -> Unit + selectedIndex: Int? = null ) { Column( modifier = modifier.fillMaxWidth() @@ -42,7 +49,8 @@ fun CherrishSelectionSection( SelectionChipGrid( items = items, selectedIndex = selectedIndex, - onItemClick = onItemClick + onItemClick = onItemClick, + chipType = chipType ) } } @@ -50,9 +58,10 @@ fun CherrishSelectionSection( @Composable private fun SelectionChipGrid( items: List, + chipType: CherrishSectionChipType, + onItemClick: (index: Int) -> Unit, modifier: Modifier = Modifier, - selectedIndex: Int? = null, - onItemClick: (index: Int) -> Unit + selectedIndex: Int? = null ) { LazyVerticalGrid( modifier = modifier.fillMaxWidth(), @@ -62,12 +71,25 @@ private fun SelectionChipGrid( userScrollEnabled = false ) { itemsIndexed(items) { index, text -> - CherrishSelectionChip( - text = text, - onClick = { onItemClick(index) }, - modifier = Modifier.fillMaxWidth(), - isSelected = selectedIndex == index - ) + when (chipType) { + CherrishSectionChipType.SELECTION_CHIP -> { + CherrishSelectionChip( + text = text, + onClick = { onItemClick(index) }, + modifier = Modifier.fillMaxWidth(), + isSelected = selectedIndex == index + ) + } + + CherrishSectionChipType.MISSION_CARD -> { + CherrishMissionCard( + text = text, + onClick = { onItemClick(index) }, + modifier = Modifier.fillMaxWidth(), + isSelected = selectedIndex == index + ) + } + } } } } @@ -100,32 +122,34 @@ private fun TitleDescriptionSection( @Preview(showBackground = true) @Composable -private fun CherrishSelectionSectionPreview_TwoOptions() { +private fun CherrishSelectionSectionPreview_SelectionChip() { CherrishTheme { var isSelected by remember { mutableIntStateOf(-1) } CherrishSelectionSection( - title = "시술 일정을 추가해볼게요.\n이미 생각해둔 시술이 있나요?", - description = "시술을 선택하셨는지 확인할게요.", - items = listOf("선택한 시술이 있어요", "아직 선택 전이에요"), + title = "요즘 가장 신경 쓰이는\n피부 고민은 무엇인가요?", + description = "선택한 고민을 기준으로 시술 정보를 정리해줘요.", + items = listOf("피부결·각질", "색소·잡티", "홍조", "탄력·주름", "모공", "트러블"), selectedIndex = isSelected, - onItemClick = { isSelected = it } + onItemClick = { isSelected = it }, + chipType = CherrishSectionChipType.SELECTION_CHIP ) } } @Preview(showBackground = true) @Composable -private fun CherrishSelectionSectionPreview_SixOptions() { +private fun CherrishSelectionSectionPreview_MissionCard() { CherrishTheme { var isSelected by remember { mutableIntStateOf(-1) } CherrishSelectionSection( - title = "요즘 가장 신경 쓰이는\n피부 고민은 무엇인가요?", - description = "선택한 고민 기준으로 시술 정보를 정리해드려요.", - items = listOf("피부결·각질", "색소·잡티", "홍조", "탄력·주름", "모공", "트러블"), + title = "챌린지 기간 동안\n진행할 미션을 선택해주세요.", + description = "복수 선택이 가능해요.", + items = listOf("반신욕 20분", "진정 토너+세럼", "피부결 정돈", "괄사", "톤 개선", "선크림 바르기"), selectedIndex = isSelected, - onItemClick = { isSelected = it } + onItemClick = { isSelected = it }, + chipType = CherrishSectionChipType.MISSION_CARD ) } } From dffd8adff9f577227a4fb3d17f8798907b661b51 Mon Sep 17 00:00:00 2001 From: sssuhha Date: Tue, 13 Jan 2026 01:42:40 +0900 Subject: [PATCH 4/9] =?UTF-8?q?[REF/#38]=20=EC=B9=A9=20=ED=83=80=EC=9E=85?= =?UTF-8?q?=20enum=EC=9D=84=20=EB=B3=84=EB=8F=84=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/section/CherrishSelectionSection.kt | 6 +----- .../designsystem/component/type/CherrishSectionChipType.kt | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.kt diff --git a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt index 1cc1d8917..9059b9f13 100644 --- a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt @@ -19,13 +19,9 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.cherrish.android.core.designsystem.component.chip.CherrishMissionCard import com.cherrish.android.core.designsystem.component.chip.CherrishSelectionChip +import com.cherrish.android.core.designsystem.component.type.CherrishSectionChipType import com.cherrish.android.core.designsystem.theme.CherrishTheme -enum class CherrishSectionChipType { - SELECTION_CHIP, - MISSION_CARD -} - @Composable fun CherrishSelectionSection( title: String, diff --git a/app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.kt new file mode 100644 index 000000000..aa725fa8c --- /dev/null +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.kt @@ -0,0 +1,6 @@ +package com.cherrish.android.core.designsystem.component.type + +enum class CherrishSectionChipType { + SELECTION_CHIP, + MISSION_CARD +} From 3113c6a0be686a6f30ea2bd6a45ff080a1686c5a Mon Sep 17 00:00:00 2001 From: sssuhha Date: Tue, 13 Jan 2026 20:21:47 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[CHORE/#38]=20Preview=20=ED=95=A8=EC=88=98?= =?UTF-8?q?=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/section/CherrishSelectionSection.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt index 9059b9f13..379e5f9e7 100644 --- a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt @@ -107,6 +107,7 @@ private fun TitleDescriptionSection( if (!description.isNullOrBlank()) { Spacer(modifier = Modifier.height(4.dp)) + Text( text = description, style = CherrishTheme.typography.body1R14, @@ -118,7 +119,7 @@ private fun TitleDescriptionSection( @Preview(showBackground = true) @Composable -private fun CherrishSelectionSectionPreview_SelectionChip() { +private fun SelectionSectionSelectionChipPreview() { CherrishTheme { var isSelected by remember { mutableIntStateOf(-1) } @@ -135,7 +136,7 @@ private fun CherrishSelectionSectionPreview_SelectionChip() { @Preview(showBackground = true) @Composable -private fun CherrishSelectionSectionPreview_MissionCard() { +private fun SelectionSectionMissionCardPreview() { CherrishTheme { var isSelected by remember { mutableIntStateOf(-1) } From 163409b3b68b4a3963a6a1cfb1fffe81487fe80c Mon Sep 17 00:00:00 2001 From: sssuhha Date: Tue, 13 Jan 2026 20:41:58 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[REF/#38]=20items=EB=A5=BC=20ImmutableList?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/section/CherrishSelectionSection.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt index 379e5f9e7..2d0b54e4e 100644 --- a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt @@ -21,11 +21,13 @@ import com.cherrish.android.core.designsystem.component.chip.CherrishMissionCard import com.cherrish.android.core.designsystem.component.chip.CherrishSelectionChip import com.cherrish.android.core.designsystem.component.type.CherrishSectionChipType import com.cherrish.android.core.designsystem.theme.CherrishTheme +import kotlinx.collections.immutable.ImmutableList +import kotlinx.collections.immutable.persistentListOf @Composable fun CherrishSelectionSection( title: String, - items: List, + items: ImmutableList, chipType: CherrishSectionChipType, onItemClick: (index: Int) -> Unit, modifier: Modifier = Modifier, @@ -53,7 +55,7 @@ fun CherrishSelectionSection( @Composable private fun SelectionChipGrid( - items: List, + items: ImmutableList, chipType: CherrishSectionChipType, onItemClick: (index: Int) -> Unit, modifier: Modifier = Modifier, @@ -126,7 +128,7 @@ private fun SelectionSectionSelectionChipPreview() { CherrishSelectionSection( title = "요즘 가장 신경 쓰이는\n피부 고민은 무엇인가요?", description = "선택한 고민을 기준으로 시술 정보를 정리해줘요.", - items = listOf("피부결·각질", "색소·잡티", "홍조", "탄력·주름", "모공", "트러블"), + items = persistentListOf("여드름 ∙ 트러블", "진정 토너+세럼", "피부결 정돈"), selectedIndex = isSelected, onItemClick = { isSelected = it }, chipType = CherrishSectionChipType.SELECTION_CHIP @@ -143,7 +145,7 @@ private fun SelectionSectionMissionCardPreview() { CherrishSelectionSection( title = "챌린지 기간 동안\n진행할 미션을 선택해주세요.", description = "복수 선택이 가능해요.", - items = listOf("반신욕 20분", "진정 토너+세럼", "피부결 정돈", "괄사", "톤 개선", "선크림 바르기"), + items = persistentListOf("반신욕 20분", "진정 토너+세럼", "피부결 정돈", "괄사", "톤 개선", "선크림 바르기"), selectedIndex = isSelected, onItemClick = { isSelected = it }, chipType = CherrishSectionChipType.MISSION_CARD From 3023d5732676a98c1143c2f575be5bc4baf36408 Mon Sep 17 00:00:00 2001 From: sssuhha Date: Tue, 13 Jan 2026 20:43:51 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[DEL/#38]=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20userScrollEnabled=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?= =?UTF-8?q?=ED=84=B0=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designsystem/component/section/CherrishSelectionSection.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt index 2d0b54e4e..e236d4a65 100644 --- a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt @@ -65,8 +65,7 @@ private fun SelectionChipGrid( modifier = modifier.fillMaxWidth(), columns = GridCells.Fixed(2), horizontalArrangement = Arrangement.spacedBy(12.dp), - verticalArrangement = Arrangement.spacedBy(12.dp), - userScrollEnabled = false + verticalArrangement = Arrangement.spacedBy(12.dp) ) { itemsIndexed(items) { index, text -> when (chipType) { From fc0da3737dcdb59aa9c02a89d42641ab629907d7 Mon Sep 17 00:00:00 2001 From: sssuhha Date: Tue, 13 Jan 2026 20:52:55 +0900 Subject: [PATCH 8/9] =?UTF-8?q?[REF/#38]=20LazyGrid=EC=97=90=20key=20?= =?UTF-8?q?=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/section/CherrishSelectionSection.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt index e236d4a65..e95224f30 100644 --- a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt @@ -67,7 +67,10 @@ private fun SelectionChipGrid( horizontalArrangement = Arrangement.spacedBy(12.dp), verticalArrangement = Arrangement.spacedBy(12.dp) ) { - itemsIndexed(items) { index, text -> + itemsIndexed( + items = items, + key = { index, item -> "$item-$index" } + ) { index, text -> when (chipType) { CherrishSectionChipType.SELECTION_CHIP -> { CherrishSelectionChip( From 11b3e4d28e719ad43688b9767d631baad8e82516 Mon Sep 17 00:00:00 2001 From: sssuhha Date: Tue, 13 Jan 2026 21:03:51 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[REF/#38]=20descriptionTextStyle=EC=9D=84?= =?UTF-8?q?=20=EC=99=B8=EB=B6=80=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0?= =?UTF-8?q?=EB=A1=9C=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/section/CherrishSelectionSection.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt index e95224f30..ecd441ead 100644 --- a/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt +++ b/app/src/main/java/com/cherrish/android/core/designsystem/component/section/CherrishSelectionSection.kt @@ -15,6 +15,7 @@ import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier +import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.cherrish.android.core.designsystem.component.chip.CherrishMissionCard @@ -27,6 +28,7 @@ import kotlinx.collections.immutable.persistentListOf @Composable fun CherrishSelectionSection( title: String, + descriptionTextStyle: TextStyle, items: ImmutableList, chipType: CherrishSectionChipType, onItemClick: (index: Int) -> Unit, @@ -39,6 +41,7 @@ fun CherrishSelectionSection( ) { TitleDescriptionSection( title = title, + descriptionTextStyle = descriptionTextStyle, description = description ) @@ -97,6 +100,7 @@ private fun SelectionChipGrid( @Composable private fun TitleDescriptionSection( title: String, + descriptionTextStyle: TextStyle, modifier: Modifier = Modifier, description: String? = null ) { @@ -114,7 +118,7 @@ private fun TitleDescriptionSection( Text( text = description, - style = CherrishTheme.typography.body1R14, + style = descriptionTextStyle, color = CherrishTheme.colors.gray700 ) } @@ -130,6 +134,7 @@ private fun SelectionSectionSelectionChipPreview() { CherrishSelectionSection( title = "요즘 가장 신경 쓰이는\n피부 고민은 무엇인가요?", description = "선택한 고민을 기준으로 시술 정보를 정리해줘요.", + descriptionTextStyle = CherrishTheme.typography.body1R14, items = persistentListOf("여드름 ∙ 트러블", "진정 토너+세럼", "피부결 정돈"), selectedIndex = isSelected, onItemClick = { isSelected = it }, @@ -147,6 +152,7 @@ private fun SelectionSectionMissionCardPreview() { CherrishSelectionSection( title = "챌린지 기간 동안\n진행할 미션을 선택해주세요.", description = "복수 선택이 가능해요.", + descriptionTextStyle = CherrishTheme.typography.body1M14, items = persistentListOf("반신욕 20분", "진정 토너+세럼", "피부결 정돈", "괄사", "톤 개선", "선크림 바르기"), selectedIndex = isSelected, onItemClick = { isSelected = it },