Port ebde60ca82318d20628b591ef31ab15aa92edd3a to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
25 lines
410 B
TypeScript
25 lines
410 B
TypeScript
interface BaseMenuItem {
|
|
text: string;
|
|
dangerous?: boolean;
|
|
}
|
|
|
|
interface ActionMenuItem extends BaseMenuItem {
|
|
action: () => void;
|
|
}
|
|
|
|
interface LinkMenuItem extends BaseMenuItem {
|
|
to: string;
|
|
}
|
|
|
|
interface ExternalLinkMenuItem extends BaseMenuItem {
|
|
href: string;
|
|
}
|
|
|
|
export type MenuItem =
|
|
| ActionMenuItem
|
|
| LinkMenuItem
|
|
| ExternalLinkMenuItem
|
|
| null;
|
|
|
|
export type DropdownMenu = MenuItem[];
|