"use client"; import { useState } from "react"; import { cn } from "@/lib/utils"; interface TabsProps { tabs: { id: string; label: string }[]; defaultTab?: string; children: (activeTab: string) => React.ReactNode; className?: string; } export function Tabs({ tabs, defaultTab, children, className }: TabsProps) { const [active, setActive] = useState(defaultTab || tabs[0]?.id || ""); return (
{tabs.map((tab) => ( ))}
{children(active)}
); }