From e019455f186f0c87fff640995775f3befb4e5290 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 15 Jun 2024 05:58:41 +0000 Subject: [PATCH] Split PanelType out into own file --- src/frontend/src/components/nav/Panel.tsx | 14 ++++++++++++++ src/frontend/src/components/nav/PanelGroup.tsx | 14 +------------- 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 src/frontend/src/components/nav/Panel.tsx diff --git a/src/frontend/src/components/nav/Panel.tsx b/src/frontend/src/components/nav/Panel.tsx new file mode 100644 index 0000000000..d03602e2f7 --- /dev/null +++ b/src/frontend/src/components/nav/Panel.tsx @@ -0,0 +1,14 @@ +import { ReactNode } from 'react'; + +/** + * Type used to specify a single panel in a panel group + */ +export type PanelType = { + name: string; + label: string; + icon?: ReactNode; + content: ReactNode; + hidden?: boolean; + disabled?: boolean; + showHeadline?: boolean; +}; diff --git a/src/frontend/src/components/nav/PanelGroup.tsx b/src/frontend/src/components/nav/PanelGroup.tsx index 5c1671fb90..8df7c679cc 100644 --- a/src/frontend/src/components/nav/PanelGroup.tsx +++ b/src/frontend/src/components/nav/PanelGroup.tsx @@ -25,19 +25,7 @@ import { navigateToLink } from '../../functions/navigation'; import { useLocalState } from '../../states/LocalState'; import { Boundary } from '../Boundary'; import { StylishText } from '../items/StylishText'; - -/** - * Type used to specify a single panel in a panel group - */ -export type PanelType = { - name: string; - label: string; - icon?: ReactNode; - content: ReactNode; - hidden?: boolean; - disabled?: boolean; - showHeadline?: boolean; -}; +import { PanelType } from './Panel'; export type PanelProps = { pageKey: string;