import { memo } from 'react'; export const Segmented = memo(function Segmented({ options, value, onChange, size = 'md', testid, }: { options: { value: T; label: string }[]; value: T; onChange: (v: T) => void; size?: 'sm' | 'md'; testid?: string; }): JSX.Element { const sizeClasses = size === 'sm' ? 'px-2.5 py-0.5 text-xs' : 'px-3.5 py-1 text-[13px]'; return (
{options.map((opt) => { const isActive = opt.value === value; return ( ); })}
); }) as (props: { options: { value: T; label: string }[]; value: T; onChange: (v: T) => void; size?: 'sm' | 'md'; testid?: string; }) => JSX.Element;