From f0e80463fa23a6a52623b7507d6959d19af6ae07 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 9 Nov 2025 20:15:12 -0800 Subject: clean up admin page into components --- frontend/src/components/CollapsibleSection.tsx | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 frontend/src/components/CollapsibleSection.tsx (limited to 'frontend/src/components/CollapsibleSection.tsx') diff --git a/frontend/src/components/CollapsibleSection.tsx b/frontend/src/components/CollapsibleSection.tsx new file mode 100644 index 0000000..08df24f --- /dev/null +++ b/frontend/src/components/CollapsibleSection.tsx @@ -0,0 +1,40 @@ +import { ReactNode } from 'react'; + +interface CollapsibleSectionProps { + title: string; + isOpen: boolean; + onToggle: () => void; + children: ReactNode; +} + +const CollapsibleSection = ({ title, isOpen, onToggle, children }: CollapsibleSectionProps) => { + return ( +
+
+ + {isOpen && ( +
+ {children} +
+ )} +
+
+ ); +}; + +export default CollapsibleSection; \ No newline at end of file -- cgit v1.2.3