| 1 | "use client"; |
| 2 | |
| 3 | import { cn } from "@/lib/utils"; |
| 4 | import { useThemePanelState } from "./theme-panel-state"; |
| 5 | |
| 6 | export function ThemeTabs() { |
| 7 | const { tab, setTab } = useThemePanelState(); |
| 8 | |
| 9 | const handleTabChange = (tab: "standard" | "public") => { |
| 10 | setTab(tab); |
| 11 | }; |
| 12 | |
| 13 | return ( |
| 14 | <div className="px-2"> |
| 15 | <div className="flex gap-1 rounded-lg bg-muted p-1"> |
| 16 | <button |
| 17 | type="button" |
| 18 | onClick={() => handleTabChange("standard")} |
| 19 | className={cn( |
| 20 | "flex-1 rounded-md px-3 py-2 text-sm font-medium transition-colors", |
| 21 | tab === "standard" |
| 22 | ? "bg-background text-foreground shadow" |
| 23 | : "text-muted-foreground hover:text-foreground", |
| 24 | )} |
| 25 | > |
| 26 | ALLWEONE |
| 27 | </button> |
| 28 | <button |
| 29 | type="button" |
| 30 | onClick={() => handleTabChange("public")} |
| 31 | className={cn( |
| 32 | "flex-1 rounded-md px-3 py-2 text-sm font-medium transition-colors", |
| 33 | tab === "public" |
| 34 | ? "bg-background text-foreground shadow" |
| 35 | : "text-muted-foreground hover:text-foreground", |
| 36 | )} |
| 37 | > |
| 38 | My themes |
| 39 | </button> |
| 40 | </div> |
| 41 | </div> |
| 42 | ); |
| 43 | } |
| 44 |