Eugen Rochko c915165370 [Glitch] Refactor <Header> into TypeScript
Port ebde60ca82318d20628b591ef31ab15aa92edd3a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-03-06 21:56:30 +01:00

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[];