KalugaButton

sealed class KalugaButton

A button a KalugaButtonStyle applied

Inheritors

Types

Link copied to clipboard
data class Plain(val text: String, val style: KalugaButtonStyle.WithText<*>, val isEnabled: Boolean = true, val action: () -> Unit) : KalugaButton.WithText

A KalugaButton.WithText that displays a regular text

Link copied to clipboard
data class Styled(val text: StyledString, val style: KalugaButtonStyle.WithText<*>, val isEnabled: Boolean = true, val action: () -> Unit) : KalugaButton.WithText
Link copied to clipboard
data class WithoutText(val style: KalugaButtonStyle.WithoutText<*>, val isEnabled: Boolean = true, val action: () -> Unit) : KalugaButton

A KalugaButton with a KalugaButton.WithoutText that does not display any text

Link copied to clipboard
sealed class WithText : KalugaButton

A KalugaButton with a KalugaButton.WithText that displays text

Properties

Link copied to clipboard
abstract val action: () -> Unit

Function to execute when the button is pressed

Link copied to clipboard
abstract val isEnabled: Boolean

If true the button can be interacted with

Link copied to clipboard
abstract val style: KalugaButtonStyle<*>

The KalugaButtonStyle of the button