"use client"; /** * Shared underline section tabs for prompt editor and workflow side panels. * Left-aligned flex chips (not equal-width grid); active state is a primary * bottom border (not pill Tabs). */ import { cn } from "@/lib/utils"; export type SectionAnchorTab = { id: string; label: string; }; export function SectionAnchorTabs({ ariaLabel, sections, activeSectionId, onSelect, className, contentClassName, }: { ariaLabel: string; sections: readonly SectionAnchorTab[]; activeSectionId: string; onSelect: (sectionId: string) => void; className?: string; /** Optional width/centering wrapper around the tab row (prompt page uses max-w-7xl). */ contentClassName?: string; }) { if (sections.length === 0) return null; const list = (
{sections.map((section) => { const active = activeSectionId === section.id; return ( ); })}
); return ( ); }