disable next btn if amount is 0
This commit is contained in:
parent
59153170bf
commit
bb9db73182
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user