Skip to content

Commit

Permalink
add : 더블타이틀바에 네비게이션 아이콘 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Gael-Android committed Feb 1, 2024
1 parent 7b058ab commit d2373b2
Showing 1 changed file with 28 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fun DoubleTitleTopBar(
modifier: Modifier = Modifier,
title: String = "",
subtitle: String = "",
navigationIcon: @Composable () -> Unit = {},
actions: @Composable RowScope.() -> Unit = {},
) {
TopAppBar(
Expand All @@ -36,24 +37,27 @@ fun DoubleTitleTopBar(
modifier = Modifier.fillMaxWidth()
) {

Column(
modifier = Modifier.padding(
start = 16.dp,
top = 12.dp,
end = 16.dp,
bottom = 8.dp
)
) {
YdsText(
text = subtitle,
style = YdsTheme.typography.body2,
color = YdsTheme.colors.textPrimary
)
YdsText(
text = title,
style = YdsTheme.typography.title2,
color = YdsTheme.colors.textPrimary
)
Row {
navigationIcon()
Column(
modifier = Modifier.padding(
start = 16.dp,
top = 12.dp,
end = 16.dp,
bottom = 8.dp
)
) {
YdsText(
text = subtitle,
style = YdsTheme.typography.body2,
color = YdsTheme.colors.textPrimary
)
YdsText(
text = title,
style = YdsTheme.typography.title2,
color = YdsTheme.colors.textPrimary
)
}
}

Row(
Expand All @@ -77,6 +81,12 @@ private fun PreviewDoubleTitleTopBar() {
DoubleTitleTopBar(
title = "타이틀",
subtitle = "서브타이틀",
navigationIcon = {
TopBarButton(
icon = R.drawable.ic_arrow_left_line,
isDisabled = false,
)
},
actions = {
TopBarButton(
icon = R.drawable.ic_ground_filled,
Expand Down

0 comments on commit d2373b2

Please sign in to comment.