Skip to content

Commit

Permalink
Allow disabling buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
KangarooKoala committed Apr 11, 2024
1 parent 4a3ddcf commit b769e78
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import com.scouting.app.R
fun LargeButton(
text: String,
modifier: Modifier = Modifier,
enabled: Boolean = true,
icon: Painter? = null,
contentDescription: String? = null,
onClick: () -> Unit,
Expand All @@ -35,6 +36,7 @@ fun LargeButton(
color = colorBorder,
shape = MaterialTheme.shapes.large
),
enabled = enabled,
onClick = onClick,
shape = MaterialTheme.shapes.large,
elevation = ButtonDefaults.buttonElevation(0.dp),
Expand Down Expand Up @@ -66,6 +68,7 @@ fun LargeButton(
fun MediumButton(
text: String,
modifier: Modifier = Modifier,
enabled: Boolean = true,
icon: Painter? = null,
contentDescription: String? = null,
onClick: () -> Unit,
Expand All @@ -75,6 +78,7 @@ fun MediumButton(
modifier = modifier
.height(55.dp)
.clip(MaterialTheme.shapes.medium),
enabled = enabled,
onClick = onClick,
shape = MaterialTheme.shapes.medium,
elevation = ButtonDefaults.buttonElevation(0.dp),
Expand Down Expand Up @@ -104,6 +108,7 @@ fun MediumButton(
fun SmallButton(
text: String,
modifier: Modifier = Modifier,
enabled: Boolean = true,
icon: Painter? = null,
contentDescription: String? = null,
onClick: () -> Unit,
Expand All @@ -119,6 +124,7 @@ fun SmallButton(
color = color,
shape = MaterialTheme.shapes.medium
),
enabled = enabled,
shape = MaterialTheme.shapes.medium,
onClick = onClick,
elevation = ButtonDefaults.buttonElevation(0.dp),
Expand Down

0 comments on commit b769e78

Please sign in to comment.