@dxos/react-ui
    Preparing search index...

    Type Alias MenuItem

    MenuItem:
        | { label: string; type: "group" }
        | { type: "separator" }
        | {
            label: string;
            onSelect: () => void;
            selected: boolean;
            testId?: string;
            type: "option";
        }
        | {
            checked: boolean;
            label: string;
            onCheckedChange: (checked: boolean) => void;
            testId?: string;
            type: "checkbox";
        }

    One entry in a MenuButton's menu: a caller describes the menu it wants instead of assembling the Menu parts.

    Type declaration

    • { label: string; type: "group" }

      Heading over the entries that follow, up to the next heading or separator; not selectable.

    • { type: "separator" }
    • {
          label: string;
          onSelect: () => void;
          selected: boolean;
          testId?: string;
          type: "option";
      }

      Single-select entry; consecutive options form one radio group, checked while selected.

    • {
          checked: boolean;
          label: string;
          onCheckedChange: (checked: boolean) => void;
          testId?: string;
          type: "checkbox";
      }