Function: ButtonOrDropdownButton()

ButtonOrDropdownButton<T>(props): Element

Use this primitive to create a toolbar button that can be either a button or a dropdown, depending on the number of items passed.

Type parameters

Type parameter
T extends string

Parameters

ParameterTypeDescription
propsobject-
props.childrenReactNodeThe contents of the button - usually an icon.
props.itemsobject[]The items to show in the dropdown.
props.onChoose(value) => voidThe function to execute when the button is clicked or an item is chosen from the dropdown. If there is only one item in the dropdown, the value will be an empty string.
props.titlestringThe title used for the tooltip.

Returns

Element