File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
common/src/main/kotlin/io/homeassistant/companion/android/common/compose/composable Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,14 @@ import io.homeassistant.companion.android.common.compose.theme.LocalHAColorSchem
2424 * - if onHelpClick is not null, a help button will be added
2525 * - if onBackClick is not null, a back button will be added
2626 */
27- @OptIn(ExperimentalMaterial3Api ::class )
2827@Composable
2928fun HATopBar (
3029 modifier : Modifier = Modifier ,
3130 title : @Composable () -> Unit = {},
3231 onHelpClick : (() -> Unit )? = null,
3332 onBackClick : (() -> Unit )? = null,
3433) {
35- TopAppBar (
34+ HATopBar (
3635 title = title,
3736 navigationIcon = {
3837 onBackClick?.let {
@@ -54,6 +53,26 @@ fun HATopBar(
5453 }
5554 }
5655 },
56+ modifier = modifier,
57+ )
58+ }
59+
60+ @OptIn(ExperimentalMaterial3Api ::class )
61+ @Composable
62+ fun HATopBar (
63+ modifier : Modifier = Modifier ,
64+ title : @Composable () -> Unit = {},
65+ navigationIcon : (@Composable () -> Unit )? = null,
66+ actions : (@Composable () -> Unit )? = null,
67+ ) {
68+ TopAppBar (
69+ title = title,
70+ navigationIcon = {
71+ navigationIcon?.invoke()
72+ },
73+ actions = {
74+ actions?.invoke()
75+ },
5776 colors = TopAppBarColors (
5877 containerColor = LocalHAColorScheme .current.colorSurfaceDefault,
5978 // TODO validate that we use colorOnNeutralQuiet
You can’t perform that action at this time.
0 commit comments