Files
decky-frontend-lib/src/components/SidebarNavigation.ts

29 lines
720 B
TypeScript
Raw Normal View History

import { ReactNode, FC } from 'react';
import { Export, findModuleExport } from '../webpack';
export interface SidebarNavigationPage {
title: ReactNode;
content: ReactNode;
icon?: ReactNode;
visible?: boolean;
hideTitle?: boolean;
identifier?: string;
route?: string;
link?: string;
2022-10-24 20:33:40 -04:00
padding?: 'none' | 'compact';
}
export interface SidebarNavigationProps {
title?: string;
pages: (SidebarNavigationPage | 'separator')[];
showTitle?: boolean;
disableRouteReporting?: boolean;
page?: string;
onPageRequested?: (page: string) => void;
}
2024-05-12 15:48:13 -04:00
export const SidebarNavigation = findModuleExport((e: Export) =>
e?.toString()?.includes('"disableRouteReporting"'),
) as FC<SidebarNavigationProps>;