mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 00:38:27 +00:00
Port 22d33244ee to glitch-soc
Co-authored-by: Echo <ChaosExAnima@users.noreply.github.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
25 lines
448 B
TypeScript
25 lines
448 B
TypeScript
interface BaseMenuItem {
|
|
text: string;
|
|
dangerous?: boolean;
|
|
}
|
|
|
|
export interface ActionMenuItem extends BaseMenuItem {
|
|
action: () => void;
|
|
}
|
|
|
|
export interface LinkMenuItem extends BaseMenuItem {
|
|
to: string;
|
|
}
|
|
|
|
export interface ExternalLinkMenuItem extends BaseMenuItem {
|
|
href: string;
|
|
target?: string;
|
|
method?: 'post' | 'put' | 'delete';
|
|
}
|
|
|
|
export type MenuItem =
|
|
| ActionMenuItem
|
|
| LinkMenuItem
|
|
| ExternalLinkMenuItem
|
|
| null;
|