Skip to content

Commit 637f5d6

Browse files
committed
[ui]: 기존 컴포넌트를 재활용 가능하게 수정 (#47)
1 parent 6fa3d25 commit 637f5d6

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

app/src/main/java/com/texthip/thip/ui/common/cards/CardBookList.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ fun CardBookList(
8989

9090
Spacer(modifier = Modifier.width(12.dp))
9191

92-
IconButton(
92+
// 북마크 아이콘 제거(쓰는 화면이 안보임)
93+
/*IconButton(
9394
onClick = onBookmarkClick,
9495
modifier = Modifier.size(24.dp)
9596
) {
@@ -98,7 +99,7 @@ fun CardBookList(
9899
contentDescription = "북마크",
99100
tint = if (isBookmarked) colors.Purple else colors.Grey01
100101
)
101-
}
102+
}*/
102103
}
103104
}
104105

app/src/main/java/com/texthip/thip/ui/common/cards/CardBookSearch.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import com.texthip.thip.ui.theme.ThipTheme.typography
2828
@Composable
2929
fun CardBookSearch(
3030
modifier: Modifier = Modifier,
31+
number: Int? = null,
3132
title: String,
3233
imageRes: Int? = R.drawable.bookcover_sample, // 기본 이미지 리소스
3334
onClick: () -> Unit = {}
@@ -38,6 +39,15 @@ fun CardBookSearch(
3839
.clickable { onClick() },
3940
verticalAlignment = Alignment.CenterVertically
4041
) {
42+
number?.let {
43+
Text(
44+
text = "$it. ",
45+
style = typography.menu_m500_s16_h24,
46+
color = colors.White,
47+
modifier = Modifier.padding(end = 4.dp)
48+
)
49+
}
50+
4151
// 이미지
4252
Box(
4353
modifier = Modifier
@@ -74,6 +84,7 @@ fun CardBookSearchPreview() {
7484
verticalArrangement = Arrangement.spacedBy(8.dp)
7585
) {
7686
CardBookSearch(
87+
number = 1,
7788
title = "단 한번의 삶"
7889
)
7990
}

app/src/main/java/com/texthip/thip/ui/group/makeroom/screen/GroupRegisterBookScreen.kt renamed to app/src/main/java/com/texthip/thip/ui/group/screen/GroupRegisterBookScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.texthip.thip.ui.group.makeroom.screen
1+
package com.texthip.thip.ui.group.screen
22

33
import androidx.compose.foundation.layout.Arrangement
44
import androidx.compose.foundation.layout.Column

0 commit comments

Comments
 (0)