@@ -12,6 +12,10 @@ import androidx.compose.runtime.Composable
1212import androidx.compose.runtime.rememberCoroutineScope
1313import androidx.compose.ui.Alignment
1414import androidx.compose.ui.Modifier
15+ import androidx.compose.ui.text.SpanStyle
16+ import androidx.compose.ui.text.buildAnnotatedString
17+ import androidx.compose.ui.text.style.BaselineShift
18+ import androidx.compose.ui.text.withStyle
1519import androidx.compose.ui.tooling.preview.Preview
1620import androidx.compose.ui.unit.dp
1721import com.threegap.bitnagil.designsystem.BitnagilTheme
@@ -47,7 +51,7 @@ fun RecommendLevelBottomSheet(
4751 ) {
4852 RecommendLevel .entries.forEachIndexed { index, recommendLevel ->
4953 LevelOption (
50- optionText = recommendLevel.displayName,
54+ optionText = " 난이도 ${ recommendLevel.toKoreanLevel()} | ${recommendLevel. displayName} " ,
5155 isSelected = selectedRecommendLevel == recommendLevel,
5256 onClick = {
5357 val newLevel = if (selectedRecommendLevel == recommendLevel) null else recommendLevel
@@ -86,37 +90,52 @@ private fun LevelOption(
8690 .clickableWithoutRipple { onClick() }
8791 .padding(vertical = 8 .dp),
8892 ) {
93+ val parts = optionText.split(" | " )
94+ val annotatedString = buildAnnotatedString {
95+ if (parts.size >= 2 ) {
96+ withStyle(
97+ style = BitnagilTheme .typography.body1SemiBold.toSpanStyle(),
98+ ) {
99+ append(parts[0 ])
100+ }
101+
102+ withStyle(
103+ style = SpanStyle (
104+ color = BitnagilTheme .colors.coolGray10,
105+ baselineShift = BaselineShift (0.1f ),
106+ ),
107+ ) {
108+ append(" | " )
109+ }
110+
111+ withStyle(
112+ style = BitnagilTheme .typography.body1Regular.toSpanStyle(),
113+ ) {
114+ append(parts[1 ])
115+ }
116+ }
117+ }
118+
89119 Text (
90- text = optionText,
91- color = BitnagilTheme .colors.black,
92- style = BitnagilTheme .typography.body1Regular,
120+ text = annotatedString,
121+ color = BitnagilTheme .colors.coolGray10,
93122 modifier = Modifier .weight(1f ),
94123 )
95124
96125 if (isSelected) {
97126 BitnagilIcon (
98- id = R .drawable.ic_check ,
127+ id = R .drawable.ic_check_md ,
99128 tint = BitnagilTheme .colors.orange500,
100129 )
101130 }
102131 }
103132}
104133
105- @Preview
106- @Composable
107- private fun RecommendLevelBottomSheetPreview () {
108- RecommendLevelBottomSheet (
109- selectedRecommendLevel = null ,
110- onRecommendLevelSelected = {},
111- onDismiss = {},
112- )
113- }
114-
115134@Preview(showBackground = true )
116135@Composable
117136private fun LevelOptionPreview () {
118137 LevelOption (
119- optionText = " 가볍게 할 수 있어요" ,
138+ optionText = " 난이도 상 | 가볍게 할 수 있어요" ,
120139 isSelected = true ,
121140 onClick = {},
122141 )
0 commit comments