diff --git a/src/web/src/components/header.jsx b/src/web/src/components/header.jsx index 144c9ab..13e9d52 100644 --- a/src/web/src/components/header.jsx +++ b/src/web/src/components/header.jsx @@ -16,7 +16,7 @@ const tabs = [ ]; // Tab theme colors -const tabColors = { +const tabLineColors = { green: "bg-light-green-1 dark:bg-dark-green-1", yellow: "bg-light-yellow-1 dark:bg-dark-yellow-1", blue: "bg-light-blue-1 dark:bg-dark-blue-1", @@ -24,6 +24,14 @@ const tabColors = { aqua: "bg-light-aqua-1 dark:bg-dark-aqua-1" }; +const tabColors = { + green: "text-light-green-1 dark:text-dark-green-1", + yellow: "text-light-yellow-1 dark:text-dark-yellow-1", + blue: "text-light-blue-1 dark:text-dark-blue-1", + purple: "text-light-purple-1 dark:text-dark-purple-1", + aqua: "text-light-aqua-1 dark:text-dark-aqua-1" +}; + // Individual tab links function MenuTab({ tab, activeTab, setActiveTab }) { return ( @@ -55,7 +63,7 @@ function MenuTab({ tab, activeTab, setActiveTab }) { absolute inset-x-0 lg:bottom-0.5 md:bottom-0.5 sm:bottom-0.5 lg:h-1.5 md:h-1.5 sm:h-1 - ${tabColors[tab.color]} + ${tabLineColors[tab.color]} `} style={{ marginLeft: "0.75em", marginRight: "0.75em", borderRadius: 9999 }} transition={{ type: "spring", bounce: 0.2, duration: 0.6 }} @@ -90,8 +98,22 @@ function TabMenu({ tabs, activeTab, setActiveTab }) { ); } +// CollapsibleTab component function CollapsibleTab({ tab }) { - + return ( + + + + {tab.label} + + + + ); } function CollapsibleTabMenu() { @@ -106,19 +128,28 @@ function CollapsibleTabMenu() { - {isOpen && ( -
- {tabs.map((tab) => ( - - ))} -
- )} + + {isOpen && ( + + {tabs.map((tab, index) => ( + + + + ))} + + )} + ); }