Skip to content

Commit f428b99

Browse files
committed
[BOOK-473] refactor: 중복된 cornerShape 변수로 추출
1 parent 41f3684 commit f428b99

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/component/ImpressionGuideBox.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ fun ImpressionGuideBox(
3232
) {
3333
val bgColor = if (isSelected) ReedTheme.colors.bgTertiary else White
3434
val borderColor = if (isSelected) ReedTheme.colors.borderBrand else ReedTheme.colors.borderPrimary
35+
val cornerShape = RoundedCornerShape(ReedTheme.radius.sm)
3536

3637
Box(
3738
modifier = modifier
3839
.fillMaxWidth()
39-
.clip(RoundedCornerShape(ReedTheme.radius.sm))
40+
.clip(cornerShape)
4041
.background(bgColor)
4142
.border(
4243
width = 1.dp,
4344
color = borderColor,
44-
shape = RoundedCornerShape(ReedTheme.radius.sm),
45+
shape = cornerShape,
4546
)
4647
.noRippleClickable {
4748
onClick()

feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/ocr/component/SentenceBox.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ fun SentenceBox(
2828
val bgColor = if (isSelected) ReedTheme.colors.bgTertiary else ReedTheme.colors.bgSecondary
2929
val borderColor = if (isSelected) ReedTheme.colors.borderBrand else Color.Transparent
3030
val textStyle = if (isSelected) ReedTheme.typography.body1Medium else ReedTheme.typography.body1Regular
31+
val cornerShape = RoundedCornerShape(ReedTheme.radius.sm)
3132

3233
Box(
3334
modifier = modifier
3435
.fillMaxWidth()
35-
.clip(RoundedCornerShape(ReedTheme.radius.sm))
36+
.clip(cornerShape)
3637
.background(bgColor)
3738
.border(
3839
width = 1.dp,
3940
color = borderColor,
40-
shape = RoundedCornerShape(ReedTheme.radius.sm),
41+
shape = cornerShape,
4142
)
4243
.noRippleClickable {
4344
onClick()

feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/step/EmotionStep.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,18 @@ private fun EmotionItem(
127127
isSelected: Boolean,
128128
modifier: Modifier = Modifier,
129129
) {
130+
val cornerShape = RoundedCornerShape(ReedTheme.radius.md)
131+
130132
Box(
131133
modifier = modifier
132134
.height(214.dp)
133-
.clip(RoundedCornerShape(ReedTheme.radius.md))
135+
.clip(cornerShape)
134136
.background(color = ReedTheme.colors.bgTertiary)
135137
.then(
136138
if (isSelected) Modifier.border(
137139
width = ReedTheme.border.border15,
138140
color = ReedTheme.colors.borderBrand,
139-
shape = RoundedCornerShape(ReedTheme.radius.md),
141+
shape = cornerShape,
140142
)
141143
else Modifier,
142144
)

0 commit comments

Comments
 (0)