Refactor <Header> into TypeScript (#33956)

This commit is contained in:
Eugen Rochko authored and GitHub committed 2025-02-25 15:30:46 +00:00
1 parent 20531d1e07
commit ebde60ca82
13 files changed
+1121 -859

No files matched your search

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