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
Parameter | Type | Description |
---|---|---|
props | object | - |
props.children | ReactNode | The contents of the button - usually an icon. |
props.items | object [] | The items to show in the dropdown. |
props.onChoose | (value ) => void | The 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.title | string | The title used for the tooltip. |
Returns
Element