Skip to content

Commit 8124756

Browse files
fixes #11 : Need to add color option for TitleBarScaffold so user can modify
1 parent 051221c commit 8124756

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • compose-android/src/main/java/com/streamliners/compose/android/comp/appBar

compose-android/src/main/java/com/streamliners/compose/android/comp/appBar/TitleBar.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ fun TitleBarScaffold(
3636
snackbarHostState: SnackbarHostState? = null,
3737
containerColor: Color = MaterialTheme.colorScheme.background,
3838
contentColor: Color = contentColorFor(containerColor),
39+
topAppBarColors: TopAppBarColors = topAppBarColors(
40+
containerColor = MaterialTheme.colorScheme.primary,
41+
navigationIconContentColor = Color.White,
42+
titleContentColor = Color.White,
43+
actionIconContentColor = Color.White
44+
),
3945
actions: @Composable RowScope.() -> Unit = {},
4046
content: @Composable (PaddingValues) -> Unit
4147
) {
@@ -45,7 +51,7 @@ fun TitleBarScaffold(
4551
contentColor = contentColor,
4652
topBar = {
4753
TitleBar(
48-
title, navigationIcon, navigateUp, actions = actions
54+
title, navigationIcon, navigateUp, colors = topAppBarColors, actions = actions
4955
)
5056
},
5157
snackbarHost = {

0 commit comments

Comments
 (0)