Button

data class Button(val label: String, val onClick: () -> Unit = {}, val key: String? = null) : Element

Represents a button element that can trigger messages.

Constructors

Link copied to clipboard
constructor(label: String, onClick: () -> Unit = {}, key: String? = null)

Properties

Link copied to clipboard
open override val key: String? = null

Optional key for this element

Link copied to clipboard

The text label for the button

Link copied to clipboard
val onClick: () -> Unit

Callback invoked when button is clicked