From d2373b281baab422fb9089b84298de2d3c3082b4 Mon Sep 17 00:00:00 2001 From: Gael-Android Date: Thu, 1 Feb 2024 13:20:11 +0900 Subject: [PATCH] =?UTF-8?q?add=20:=20=EB=8D=94=EB=B8=94=ED=83=80=EC=9D=B4?= =?UTF-8?q?=ED=8B=80=EB=B0=94=EC=97=90=20=EB=84=A4=EB=B9=84=EA=B2=8C?= =?UTF-8?q?=EC=9D=B4=EC=85=98=20=EC=95=84=EC=9D=B4=EC=BD=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/topbar/DoubleTitleTopBar.kt | 46 +++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/compose/src/main/java/com/yourssu/design/system/compose/component/topbar/DoubleTitleTopBar.kt b/compose/src/main/java/com/yourssu/design/system/compose/component/topbar/DoubleTitleTopBar.kt index ddca7747..71b596a3 100644 --- a/compose/src/main/java/com/yourssu/design/system/compose/component/topbar/DoubleTitleTopBar.kt +++ b/compose/src/main/java/com/yourssu/design/system/compose/component/topbar/DoubleTitleTopBar.kt @@ -24,6 +24,7 @@ fun DoubleTitleTopBar( modifier: Modifier = Modifier, title: String = "", subtitle: String = "", + navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {}, ) { TopAppBar( @@ -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( @@ -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,