import * as React from "react"; import { cn } from "@/lib/utils"; export function Tabs({ tabs, value, onChange, }: { tabs: Array<{ value: string; label: string; content: React.ReactNode }>; value: string; onChange: (value: string) => void; }) { const active = tabs.find((tab) => tab.value === value) ?? tabs[0]; return (
{tabs.map((tab) => ( ))}
{active?.content}
); }