API reference

DialogAction Class

An action rendered by a dialog.

Signature

@Immutable
data class DialogAction(
    val label: String,
    val onClick: () -> Unit,
    val enabled: Boolean = true,
    val destructive: Boolean = false,
)

Constructors

DialogAction ( label , onClick , enabled , destructive )
Signature
constructor(
    label: String,
    onClick: () -> Unit,
    enabled: Boolean = true,
    destructive: Boolean = false,
)
Parameters
label: String  action text
onClick: () -> Unit  callback invoked when selected
enabled: Boolean  whether the action accepts input
destructive: Boolean  whether a primary action uses destructive styling
Returns
DialogAction

Properties

destructive : Boolean
[Get]
whether a primary action uses destructive styling
Signature
val destructive: Boolean = false
enabled : Boolean
[Get]
whether the action accepts input
Signature
val enabled: Boolean = true
label : String
[Get]
action text
Signature
val label: String
onClick : () -> Unit
[Get]
callback invoked when selected
Signature
val onClick: () -> Unit