disable next btn if amount is 0

This commit is contained in:
moon 2026-08-25 22:42:18 +06:30
parent 59153170bf
commit bb9db73182

View File

@ -171,16 +171,16 @@ fun InputAmount(
Text("Cancel")
}
val isAmountValid = amount.toDoubleOrNull()?.let { it > 0.0 } == true
Button(
onClick = {
if (amount.isNotEmpty()) {
onChargeClick(amount)
}
},
modifier = Modifier
.weight(1f)
.height(56.dp),
enabled = amount.isNotEmpty(),
enabled = isAmountValid,
shape = RoundedCornerShape(8.dp),
colors = ButtonDefaults.buttonColors(
containerColor = Color.LegacyRed,