TLUiMenuItemProps
Table of contents
Public interface
interface TLUiMenuItemProps<
TranslationKey extends string = string,
IconType extends string = string,
> {}
packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx
Properties
disabled
Public propertysignature
Whether this item should be disabled.
disabled?: boolean
icon
Public propertysignature
The icon to display on the item.
icon?: IconType
id
Public propertysignature
id: string
isSelected
Public propertysignature
Whether the item is selected.
isSelected?: boolean
kbd
Public propertysignature
The keyboard shortcut to display on the item.
kbd?: string
label
Public propertysignature
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
Public propertysignature
Prevent the menu from closing when the item is clicked
noClose?: boolean
onSelect
Public propertysignature
The function to call when the item is clicked.
onSelect: (source: TLUiEventSource) => Promise<void> | void
readonlyOk
Public propertysignature
If the editor is in readonly mode and the item is not marked as readonlyok, it will not be rendered.
readonlyOk?: boolean
spinner
Public propertysignature
Whether to show a spinner on the item.
spinner?: boolean