Skip to content

Instantly share code, notes, and snippets.

@pranaypatel512
Last active October 29, 2022 10:56
Show Gist options
  • Save pranaypatel512/65d44248760a07c113b8bb66f015b038 to your computer and use it in GitHub Desktop.
Save pranaypatel512/65d44248760a07c113b8bb66f015b038 to your computer and use it in GitHub Desktop.
JetKiteButton
@Composable
fun JetKiteButton(
modifier: Modifier = Modifier,
text: String,
enabled: Boolean = true,
onClick: () -> Unit
) {
Button(
modifier = modifier
.fillMaxWidth(),
onClick = onClick,
colors = ButtonDefaults.buttonColors(
containerColor = MaterialTheme.colorScheme.onPrimaryContainer,
contentColor = MaterialTheme.colorScheme.onSecondary
),
shape = RectangleShape,
contentPadding = PaddingValues(
vertical = MaterialTheme.spacing.medium,
horizontal = MaterialTheme.spacing.extraSmall
),
enabled = enabled
) {
Text(
text = text,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.headlineMedium
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment