onClick

inline fun Style.onClick(noinline action: (ClickEvent) -> Unit): Style

Sets a listener that will invoke the given lambda when this Component is clicked. Setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.


inline fun Style.onClick(enabled: Boolean, noinline action: (ClickEvent) -> Unit): Style

Sets a listener that will invoke the given lambda when this Component is clicked but only if enabled is true. If enabled, setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.