feat(sidebar-navigation): add sidebar navigation component

This commit is contained in:
Jonas Dellinger
2022-06-06 23:39:03 +02:00
parent 23ed5dd157
commit d8794ef4d3
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { ReactNode, VFC } from 'react';
import { Module, findModuleChild } from '../webpack';
export interface SidebarNavigationPages {
title: string;
route: string;
content: ReactNode;
}
export interface SidebarNavigationProps {
title?: string;
pages: SidebarNavigationPages[];
showTitle?: boolean;
disableRouteReporting?: boolean;
}
export const SidebarNavigation = findModuleChild((mod: Module) => {
for (let prop in mod) {
if (mod[prop]?.toString()?.includes('"disableRouteReporting"')) {
return mod[prop];
}
}
return null;
}) as VFC<SidebarNavigationProps>;

View File

@@ -4,6 +4,7 @@ export * from './Menu';
export * from './Modal';
export * from './Panel';
export * from './Router';
export * from './SidebarNavigation';
export * from './Slider';
export * from './Spinner';
export * from './static-classes';