Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Fix too big category/account badges on transaction card
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV committed May 23, 2022
1 parent b08350b commit 25aef3c
Showing 1 changed file with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,7 @@ private fun TransactionBadge(
.background(backgroundColor, UI.shapes.rFull)
.clickable {
onClick()
}
.padding(vertical = 4.dp),
},
verticalAlignment = Alignment.CenterVertically
) {
SpacerHor(width = 8.dp)
Expand Down Expand Up @@ -614,6 +613,43 @@ private fun PreviewTransfer() {
onPayOrGet = {},
) {

}
}
}
}
}


@Preview
@Composable
private fun PreviewTransfer_differentCurrency() {
IvyWalletPreview {
LazyColumn(Modifier.fillMaxSize()) {
val acc1 = Account(name = "DSK Bank", color = Green.toArgb(), icon = "bank")
val acc2 = Account(
name = "Revolut",
currency = "EUR",
color = IvyDark.toArgb(),
icon = "revolut"
)

item {
TransactionCard(
baseCurrency = "BGN",
categories = emptyList(),
accounts = listOf(acc1, acc2),
transaction = Transaction(
accountId = acc1.id,
toAccountId = acc2.id,
title = "Top-up revolut",
amount = 1000.0.toBigDecimal(),
toAmount = 510.toBigDecimal(),
dateTime = timeNowUTC(),
type = TransactionType.TRANSFER
),
onPayOrGet = {},
) {

}
}
}
Expand Down

0 comments on commit 25aef3c

Please sign in to comment.