@mocanvas/mocanvas · function
declare function MocanvasUiMenuItem({ id, label, icon, kbd, disabled, isSelected, source, onSelect, meta }: MocanvasUiMenuItemProps): react.JSX.ElementOne UI item rendered as a button — the thing a toolbar is made of.
Takes a TLUiToolItem spread flat, so <MocanvasUiMenuItem {...tool}
isSelected={…} /> is the whole call. An icon name the set does not have
falls back to the label's initial, so an app's own tool still gets a
pressable, labelled button without shipping artwork into mocanvas.
Mentioned here
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.