ui.ts 566 B

12345678910111213141516171819
  1. export const SidebarContentsType = {
  2. CUSTOM: 'custom',
  3. RECENT: 'recent',
  4. TREE: 'tree',
  5. TAG: 'tag',
  6. } as const;
  7. export const AllSidebarContentsType = Object.values(SidebarContentsType);
  8. export type SidebarContentsType = typeof SidebarContentsType[keyof typeof SidebarContentsType];
  9. export type ICustomTabContent = {
  10. Content: () => JSX.Element,
  11. i18n: string,
  12. Icon?: () => JSX.Element,
  13. index?: number,
  14. isLinkEnabled?: boolean | ((content: ICustomTabContent) => boolean),
  15. };
  16. export type ICustomNavTabMappings = { [key: string]: ICustomTabContent };