feat: add isEnable property to AppButton
This commit is contained in:
parent
a797e0084c
commit
1eb282f3ac
|
|
@ -22,16 +22,20 @@ import com.syaroful.agrilinkvocpro.ui.theme.MainGreen
|
|||
@Composable
|
||||
fun AppButton(
|
||||
label: String,
|
||||
isEnable: Boolean = true,
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
Button(
|
||||
onClick = onClick,
|
||||
modifier = Modifier.fillMaxWidth().padding(16.dp),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(16.dp),
|
||||
shape = RoundedCornerShape(8.dp),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = MainGreen,
|
||||
contentColor = Color.White
|
||||
),
|
||||
enabled = isEnable,
|
||||
contentPadding = PaddingValues(vertical = 16.dp, horizontal = 0.dp)
|
||||
) {
|
||||
Row(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user