|
@@ -28,13 +28,13 @@ data class MenuItem(val text: String, val icon: ImageVector, val onClick: () ->
|
|
|
fun MainTopAppBar(
|
|
fun MainTopAppBar(
|
|
|
title: @Composable () -> Unit,
|
|
title: @Composable () -> Unit,
|
|
|
onMenuClick: () -> Unit,
|
|
onMenuClick: () -> Unit,
|
|
|
- menuIcon: ImageVector = Icons.Default.Menu,
|
|
|
|
|
|
|
+ menuIcon: @Composable () -> Unit = { Icon(Icons.Default.Menu, "menu") },
|
|
|
visibleItems: List<MenuItem> = listOf(),
|
|
visibleItems: List<MenuItem> = listOf(),
|
|
|
overflowItems: List<MenuItem> = listOf(),
|
|
overflowItems: List<MenuItem> = listOf(),
|
|
|
) {
|
|
) {
|
|
|
TopAppBar(
|
|
TopAppBar(
|
|
|
title = title,
|
|
title = title,
|
|
|
- navigationIcon = { IconButton(onMenuClick) { Icon(menuIcon, null) } },
|
|
|
|
|
|
|
+ navigationIcon = { IconButton(onMenuClick, content = menuIcon) },
|
|
|
actions = { MainMenu(visibleItems, overflowItems) },
|
|
actions = { MainMenu(visibleItems, overflowItems) },
|
|
|
colors = TopAppBarDefaults.topAppBarColors(
|
|
colors = TopAppBarDefaults.topAppBarColors(
|
|
|
MaterialTheme.colorScheme.surfaceColorAtElevation(3.dp).copy(alpha = 0.98f),
|
|
MaterialTheme.colorScheme.surfaceColorAtElevation(3.dp).copy(alpha = 0.98f),
|