Skip to content

Commit 5e482a9

Browse files
committed
fix: add back button to forgot pin toolbar
1 parent 4c16482 commit 5e482a9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

app/src/main/java/to/bitkit/ui/sheets/ForgotPinSheet.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ fun ForgotPinSheet(
3535
) {
3636
BottomSheet(onDismissRequest = onDismiss) {
3737
Content(
38+
onBackClick = onDismiss,
3839
onResetClick = {
3940
onDismiss()
4041
onResetClick()
@@ -45,6 +46,7 @@ fun ForgotPinSheet(
4546

4647
@Composable
4748
private fun Content(
49+
onBackClick: (() -> Unit)? = null,
4850
onResetClick: () -> Unit,
4951
modifier: Modifier = Modifier,
5052
) {
@@ -56,7 +58,10 @@ private fun Content(
5658
.gradientBackground()
5759
.padding(horizontal = 16.dp)
5860
) {
59-
SheetTopBar(stringResource(R.string.security__pin_forgot_title))
61+
SheetTopBar(
62+
titleText = stringResource(R.string.security__pin_forgot_title),
63+
onBack = onBackClick,
64+
)
6065
VerticalSpacer(16.dp)
6166

6267
BodyM(
@@ -88,6 +93,7 @@ private fun Preview() {
8893
AppThemeSurface {
8994
BottomSheetPreview {
9095
Content(
96+
onBackClick = {},
9197
onResetClick = {},
9298
)
9399
}

0 commit comments

Comments
 (0)