feat: FE calendar, context menu, dashboard
This commit is contained in:
parent
ca005ebb0b
commit
b389f37a1d
6 changed files with 123 additions and 84 deletions
|
@ -24,6 +24,12 @@ interface ContextMenuEntryWithChildren {
|
|||
|
||||
type ContextMenuEntry = ContextMenuEntryWithAction | ContextMenuEntryWithChildren;
|
||||
|
||||
export type ExtractActionTriggers<T> =
|
||||
T extends { actionTrigger: infer U } ? U :
|
||||
T extends { children: infer C } ? ExtractActionTriggers<C> :
|
||||
T extends (infer R)[] ? ExtractActionTriggers<R> :
|
||||
never;
|
||||
|
||||
export function menuEntryWithAction(entry: ContextMenuEntry): entry is ContextMenuEntryWithAction {
|
||||
return 'actionTrigger' in entry;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue