fix(folio): show balance as a compact one-line label

per review: one line, account-name-sized, e.g. "Balance: $0.00"
instead of a large balance card.
This commit is contained in:
pj committed 2026-07-13 14:14:32 +05:30
1 parent 5dd4230251
commit 00a651b612
1 file changed
+6 -10
@@ -21,7 +21,6 @@ import app.folio.ui.BackHandler
import app.folio.ui.component.AppButton import app.folio.ui.component.AppButton
import app.folio.ui.component.BackButton import app.folio.ui.component.BackButton
import app.folio.ui.component.ButtonStyle import app.folio.ui.component.ButtonStyle
import app.folio.ui.component.Card
import app.folio.ui.component.EmptyState import app.folio.ui.component.EmptyState
import app.folio.ui.component.ErrorText import app.folio.ui.component.ErrorText
import app.folio.ui.component.FieldLabel import app.folio.ui.component.FieldLabel
@@ -87,15 +86,12 @@ fun AddTransactionScreen(state: AddTransactionUiState, onEvent: (AddTransactionE
modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp), modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp),
verticalArrangement = Arrangement.spacedBy(16.dp), verticalArrangement = Arrangement.spacedBy(16.dp),
) { ) {
Card { Text(
Text("CURRENT BALANCE", style = Type.label, color = t.textMuted) "Balance: ${formatCents(state.balanceCents)}",
Text( style = Type.body,
formatCents(state.balanceCents), color = t.textMuted,
style = Type.balance, modifier = Modifier.testTag("TxnCurrentBalance"),
color = t.text, )
modifier = Modifier.testTag("TxnCurrentBalance"),
)
}
Segmented( Segmented(
selected = if (state.type == TxnType.credit) 0 else 1, selected = if (state.type == TxnType.credit) 0 else 1,
labels = listOf("Credit", "Debit"), labels = listOf("Credit", "Debit"),