@serenity-is/corelib / ToolButtonProps
Interface: ToolButtonProps
Defined in: src/ui/widgets/toolbar.tsx:8
Props describing a single toolbar button.
Extended by
Properties
action?
optionalaction:string
Defined in: src/ui/widgets/toolbar.tsx:10
Optional action name stored on the button's data-action attribute.
cssClass?
optionalcssClass:string
Defined in: src/ui/widgets/toolbar.tsx:16
Optional CSS class(es) applied to the button.
disabled?
optionaldisabled:boolean| () =>boolean
Defined in: src/ui/widgets/toolbar.tsx:26
Whether the button is disabled; may be a function evaluated on update.
hint?
optionalhint:string
Defined in: src/ui/widgets/toolbar.tsx:14
Optional tooltip hint shown on hover.
icon?
optionalicon:IconClassName
Defined in: src/ui/widgets/toolbar.tsx:18
Optional icon class name to display before the title.
onClick()?
optionalonClick: (e) =>void
Defined in: src/ui/widgets/toolbar.tsx:20
Handler invoked when the button is clicked.
Parameters
e
MouseEvent & object
Returns
void
ref()?
optionalref: (el) =>void
Defined in: src/ui/widgets/toolbar.tsx:22
Callback invoked with the created button element.
Parameters
el
HTMLElement
Returns
void
title?
optionaltitle:string|HTMLElement|DocumentFragment|SVGElement|MathMLElement
Defined in: src/ui/widgets/toolbar.tsx:12
The button's title (text or element).
visible?
optionalvisible:boolean| () =>boolean
Defined in: src/ui/widgets/toolbar.tsx:24
Whether the button is visible; may be a function evaluated on update.