MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / Tabs

Function Tabs

app/components/UI/Tabs.tsx:11–33  ·  view source on GitHub ↗
({ tabs, children }: TabProps)

Source from the content-addressed store, hash-verified

9};
10
11export function Tabs({ tabs, children }: TabProps) {
12 return (
13 <TabsPrimitive.Root defaultValue={tabs[0].value}>
14 <TabsPrimitive.List className="">
15 {tabs.map(({ value, label }) => (
16 <TabsPrimitive.Trigger
17 value={value}
18 key={`tab-trigger-${value}`}
19 className={cx(
20 "group",
21 "mr-1 px-4 py-1 rounded-t-sm transition",
22 "text-slate-500 hover:bg-slate-100 hover:bg-opacity-50 dark:text-slate-300 dark:hover:bg-slate-900 dark:hover:bg-opacity-40",
23 "radix-state-active:bg-slate-100 radix-state-active:bg-opacity-50 radix-state-active:dark:bg-slate-900 radix-state-active:dark:text-white"
24 )}
25 >
26 {label}
27 </TabsPrimitive.Trigger>
28 ))}
29 </TabsPrimitive.List>
30 {children}
31 </TabsPrimitive.Root>
32 );
33}
34
35export const TabContent = React.forwardRef<
36 React.ElementRef<typeof TabsPrimitive.Content>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected