Skip to content

Commit ea0b247

Browse files
committed
feat: top bar text
1 parent ad5125a commit ea0b247

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

app/src/main/java/to/bitkit/ui/screens/wallets/sheets/NewTransactionSheet.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import to.bitkit.R
2323
import to.bitkit.models.NewTransactionSheetDetails
2424
import to.bitkit.models.NewTransactionSheetDirection
2525
import to.bitkit.models.NewTransactionSheetType
26+
import to.bitkit.ui.scaffold.SheetTopBar
2627
import to.bitkit.ui.shared.moneyString
2728
import to.bitkit.ui.shared.util.gradientBackground
2829
import to.bitkit.ui.theme.AppShapes
@@ -62,22 +63,21 @@ private fun NewTransactionSheetView(
6263
horizontalAlignment = Alignment.CenterHorizontally,
6364
modifier = Modifier
6465
.fillMaxSize()
65-
.padding(16.dp),
66+
.padding(horizontal = 16.dp),
6667
) {
67-
Text(
68-
text = when (details.type) {
69-
NewTransactionSheetType.LIGHTNING -> when (details.direction) {
70-
NewTransactionSheetDirection.SENT -> "Sent Instant Bitcoin"
71-
else -> "Received Instant Bitcoin"
72-
}
68+
val titleText = when (details.type) {
69+
NewTransactionSheetType.LIGHTNING -> when (details.direction) {
70+
NewTransactionSheetDirection.SENT -> stringResource(R.string.wallet__send_sent)
71+
else -> stringResource(R.string.wallet__payment_received)
72+
}
73+
74+
NewTransactionSheetType.ONCHAIN -> when (details.direction) {
75+
NewTransactionSheetDirection.SENT -> stringResource(R.string.wallet__send_sent)
76+
else -> stringResource(R.string.wallet__payment_received)
77+
}
78+
}
7379

74-
NewTransactionSheetType.ONCHAIN -> when (details.direction) {
75-
NewTransactionSheetDirection.SENT -> "Sent Bitcoin"
76-
else -> "Received Bitcoin"
77-
}
78-
},
79-
style = MaterialTheme.typography.titleMedium,
80-
)
80+
SheetTopBar(titleText)
8181

8282
Spacer(modifier = Modifier.height(24.dp))
8383

0 commit comments

Comments
 (0)