Properties of the ContextMenu React component.

interface ContextMenuProps {
    children?: ReactNode;
    onSelect: (value: number) => void;
    options: ContextMenuOption[];
}

Properties

children?: ReactNode

Children nodes that will be using this context menu.

onSelect: (value: number) => void

A callback that will be called when the user selects one of the menu items in this context menu.

Type declaration

    • (value: number): void
    • Parameters

      • value: number

        Value of the selected menu option.

      Returns void

The menu item options.