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";
}
Type declaration
- { 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.