You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

38 lines
1.3 KiB

import * as React from 'react'
import * as TabsPrimitive from '@radix-ui/react-tabs'
import { cn } from '@/lib/utils'
const Tabs = TabsPrimitive.Root
function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {
return (
<TabsPrimitive.List
className={cn(
'inline-flex h-10 items-center justify-center rounded-lg border border-border-soft bg-white/5 p-1 text-grey-3',
className,
)}
{...props}
/>
)
}
function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
return (
<TabsPrimitive.Trigger
className={cn(
'inline-flex h-8 flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-[12px] font-semibold text-grey-3 transition-colors',
'hover:bg-white/8 hover:text-grey-1',
'data-[state=active]:bg-red-mid data-[state=active]:text-white data-[state=active]:shadow-[0_6px_18px_rgba(209,39,39,.25)]',
'disabled:pointer-events-none disabled:opacity-50',
className,
)}
{...props}
/>
)
}
function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {
return <TabsPrimitive.Content className={cn('outline-none', className)} {...props} />
}
export { Tabs, TabsList, TabsTrigger, TabsContent }