import { clsx } from 'clsx'; export interface SegmentedControlOption { label: string; value: T; } interface SegmentedControlProps { ariaLabel: string; options: readonly SegmentedControlOption[]; value: T; onChange: (value: T) => void; className?: string; } export default function SegmentedControl({ ariaLabel, options, value, onChange, className, }: SegmentedControlProps) { return (
{options.map((option) => { const isSelected = option.value === value; return ( ); })}
); }