"use client"; import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; import { CopyButton } from "./copy-button"; interface CodeTabsProps { tabs: { label: string; value: string; code: string; html: string; }[]; defaultValue?: string; } export function CodeTabs({ tabs, defaultValue }: CodeTabsProps) { const defaultTab = defaultValue ?? tabs[0]?.value; return (
{tabs.map((tab) => ( {tab.label} ))}
{tabs.map((tab) => (
))}
); }