[Glitch] Refactor <Header> into TypeScript

Port ebde60ca82 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko
2025-02-25 16:30:46 +01:00
committed by Claire
parent e2ca5850c0
commit c915165370
13 changed files with 1102 additions and 743 deletions

View File

@@ -0,0 +1,24 @@
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[];