Kwik Button
A versatile button that can be customized to suit different use cases.
Parameters
Modifier to be applied to the button.
The text to be displayed on the button. Can be a String, Int or AnnotatedString.
Whether the button is in a loading state.
The text to be displayed when the button is in a loading state.
Whether the button should be outlined.
The icon to be displayed before the text. Can be an Int or ImageVector.
The icon to be displayed after the text. Can be an Int or ImageVector.
The height of the button.
The color of the button.
Whether the icon should be tinted with the button color.
Whether the button is enabled.
The style of the text. Refer to TextStyle and MaterialTheme.typography.
The style of the loading indicator. Can be KwikButtonLoadingStyle.CIRCULAR or KwikButtonLoadingStyle.LINEAR.
The action to be performed when the button is clicked.
Example usage:
KwikButton(
text = "Click me",
onClick = { /* Do something */}
)
KwikButton(
text = stringResource(id = R.string.click_me),
onClick = { /* Do something */ },
outlined = true,
leadingIcon = Icons.Default.Add,
loadingText = "Loading...",
isLoading = true,
)