From 8db3bead13441a5882d8689dfc6a9f09c82375d9 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 25 Mar 2026 16:47:22 +0100 Subject: feat: masks, properties refactor, shaders, storage migrations, and more --- apps/web/src/components/ui/tabs.tsx | 92 ++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 31 deletions(-) (limited to 'apps/web/src/components/ui/tabs.tsx') diff --git a/apps/web/src/components/ui/tabs.tsx b/apps/web/src/components/ui/tabs.tsx index d2844b63..c5cc02d7 100644 --- a/apps/web/src/components/ui/tabs.tsx +++ b/apps/web/src/components/ui/tabs.tsx @@ -5,51 +5,81 @@ import { Tabs as TabsPrimitive } from "radix-ui"; import { cn } from "@/utils/ui"; -const Tabs = TabsPrimitive.Root; +type TabsVariant = "default" | "underline"; + +const TabsVariantContext = React.createContext("default"); + +const Tabs = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & { + variant?: TabsVariant; + } +>(({ variant = "default", ...props }, ref) => ( + + + +)); +Tabs.displayName = TabsPrimitive.Root.displayName; const TabsList = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - -)); +>(({ className, ...props }, ref) => { + const variant = React.useContext(TabsVariantContext); + return ( + + ); +}); TabsList.displayName = TabsPrimitive.List.displayName; const TabsTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - -)); +>(({ className, ...props }, ref) => { + const variant = React.useContext(TabsVariantContext); + return ( + + ); +}); TabsTrigger.displayName = TabsPrimitive.Trigger.displayName; const TabsContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - -)); +>(({ className, ...props }, ref) => { + const variant = React.useContext(TabsVariantContext); + return ( + + ); +}); TabsContent.displayName = TabsPrimitive.Content.displayName; export { Tabs, TabsList, TabsTrigger, TabsContent }; -- cgit v1.3.1