TLUiMenuItemProps
See source codeTable of contents
interface TLUiMenuItemProps<
TranslationKey extends string = string,
IconType extends string = string,
> {}
Properties
disabled
optional
Whether this item should be disabled.
disabled?: boolean
icon
optional
The icon to display on the item.
icon?: IconType
id
id: string
isSelected
optional
Whether the item is selected.
isSelected?: boolean
kbd
optional
The keyboard shortcut to display on the item.
kbd?: string
label
optional
The label to display on the item. If it's a string, it will be translated. If it's an object, the keys will be used as the language keys and the values will be translated.
label?:
| {
[key: string]: TranslationKey
}
| TranslationKey
noClose
optional
Prevent the menu from closing when the item is clicked
noClose?: boolean
readonlyOk
optional
If the editor is in readonly mode and the item is not marked as readonlyok, it will not be rendered.
readonlyOk?: boolean
spinner
optional
Whether to show a spinner on the item.
spinner?: boolean
Methods
onSelect
The function to call when the item is clicked.
Parameters
Name | Description |
---|---|
|
Returns
Promise<void> | void
Prev
TLUiMenuGroupPropsNext
TLUiMenuSubmenuProps