Documentation

@kanunilabs/datagrid


@kanunilabs/datagrid / ToolbarButtonSpec

Interface: ToolbarButtonSpec

Properties

disabledReason?

optional disabledReason?: string

Set while the button cannot be used: clicks are ignored and this is the reason given.


icon

icon: string | Element

The glyph: an element (e.g. an inline SVG) or SVG/HTML markup.


label

label: string

The button's name: its accessible name and the start of its tooltip.


onClick?

optional onClick?: () => void

Returns

void


shortcut?

optional shortcut?: string

Keyboard shortcut shown in the tooltip and as aria-keyshortcuts.


showLabel?

optional showLabel?: boolean

Show the label beside the icon. Default false (icon only).


testId?

optional testId?: string

data-testid on the button.