9ae61432ba
F1: shadcn-style primitive set in components/ui (Button, Card, Badge, Input, Switch, Separator, Skeleton, Tooltip, DropdownMenu, Dialog, Sheet, Tabs, Table, Toast+useToast, ThemeToggle, PageHeader/StatCard/EmptyState) on Radix + cva. F2: Layout rebuilt on the new system — sidebar with primary nav (lucide icons) + favorites/saved-searches/mailbox/smart-folder sections, sticky topbar with search, sync status, theme toggle, digest toggle, and an account dropdown. All prior behavior preserved (auth, sync, collapse/section persistence, "/" search focus). App wrapped in ToastProvider + TooltipProvider. Build green. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
1.4 KiB
React
43 lines
1.4 KiB
React
import { forwardRef } from 'react';
|
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
import { cn } from '../../lib/utils.js';
|
|
|
|
const Tabs = TabsPrimitive.Root;
|
|
|
|
const TabsList = forwardRef(function TabsList({ className, ...props }, ref) {
|
|
return (
|
|
<TabsPrimitive.List
|
|
ref={ref}
|
|
className={cn('inline-flex h-9 items-center justify-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground', className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
});
|
|
|
|
const TabsTrigger = forwardRef(function TabsTrigger({ className, ...props }, ref) {
|
|
return (
|
|
<TabsPrimitive.Trigger
|
|
ref={ref}
|
|
className={cn(
|
|
'inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all',
|
|
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',
|
|
'data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:shadow-sm',
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
});
|
|
|
|
const TabsContent = forwardRef(function TabsContent({ className, ...props }, ref) {
|
|
return (
|
|
<TabsPrimitive.Content
|
|
ref={ref}
|
|
className={cn('mt-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-md', className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
});
|
|
|
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|