Skip to content

Commit

Permalink
TopBar - Adds 2 new Composable
Browse files Browse the repository at this point in the history
- NoTitleTopBarWithBackButton
- NoTitleTopBarWithCloseButton
  • Loading branch information
Tweener committed Aug 17, 2024
1 parent 9393d37 commit 034509c
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ fun SimpleTopBar(
)
}

@Composable
fun NoTitleTopBarWithBackButton(
modifier: Modifier = Modifier,
colors: TopBarColors = TopBarDefaults.colors(),
actions: @Composable RowScope.() -> Unit = {},
onBackClicked: (() -> Unit)? = null
) {
TopBarWithIcon(
modifier = modifier,
title = "",
topBarColors = colors,
navigationIcon = { ArrowBackIconButton(onClick = onBackClicked) },
actions = actions
)
}

@Composable
fun TopBarWithBackButton(
title: String,
Expand All @@ -115,6 +131,22 @@ fun TopBarWithBackButton(
)
}

@Composable
fun NoTitleTopBarWithCloseButton(
modifier: Modifier = Modifier,
colors: TopBarColors = TopBarDefaults.colors(),
actions: @Composable RowScope.() -> Unit = {},
onBackClicked: (() -> Unit)? = null
) {
TopBarWithIcon(
modifier = modifier,
title = "",
topBarColors = colors,
navigationIcon = { CloseBackIconButton(onClick = onBackClicked) },
actions = actions
)
}

@Composable
fun TopBarWithCloseButton(
title: String,
Expand Down

0 comments on commit 034509c

Please sign in to comment.