From 59a6c539a150adf9ff9ed3d91854b2bea6e7c517 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Thu, 3 Jul 2025 20:43:23 +0200 Subject: feat: implement media panel with tab navigation --- .../src/components/editor/media-panel/tabbar.tsx | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 apps/web/src/components/editor/media-panel/tabbar.tsx (limited to 'apps/web/src/components/editor/media-panel/tabbar.tsx') diff --git a/apps/web/src/components/editor/media-panel/tabbar.tsx b/apps/web/src/components/editor/media-panel/tabbar.tsx new file mode 100644 index 00000000..90f8a70d --- /dev/null +++ b/apps/web/src/components/editor/media-panel/tabbar.tsx @@ -0,0 +1,29 @@ +"use client"; + +import { cn } from "@/lib/utils"; +import { Tab, tabs, useMediaPanelStore } from "./store"; + +export function TabBar() { + const { activeTab, setActiveTab } = useMediaPanelStore(); + + return ( +
+ {(Object.keys(tabs) as Tab[]).map((tabKey) => { + const tab = tabs[tabKey]; + return ( +
setActiveTab(tabKey)} + key={tabKey} + > + + {tab.label} +
+ ); + })} +
+ ); +} -- cgit v1.3.1