Button

fun Button(enabled: Boolean = true, style: ButtonStyle = ButtonStyle.OUTLINED, colorStyle: ColorStyle = ColorStyle.DEFAULT, text: String, icon: @Composable () -> Unit? = null, modifier: Modifier = Modifier, paddingValues: PaddingValues = getPaddingValues(icon != null), onClick: () -> Unit)

DHIS2 button with generic icon slot. wraps DHIS2 SimpleButton which in turn wraps material 3 Button.

Parameters

enabled

: Controls the enabled state of the button. When false, this button will not be clickable and will appear disabled to accessibility services.

style

: Controls style of the button. Will be OUTLINED by default, but can be FILLED, TEXT, TONAL, ELEVATED or KEYBOARDKEY.

colorStyle

: the button color style to be used, can be ColorStyle.DEFAULT or ColorStyle.ERROR.

text

: The text to display within.

icon

: The button icon content.

paddingValues

: optional PaddingValues to be overridden.

modifier

: optional Modifier.

onClick

:Will be called when the user clicks the button.