/** Two-way switch on a white card: the chosen option is a black pill, as on minimax.io's tabs. */ export function Segmented({ value, options, onChange, label }: { value: T; options: [{ value: T; label: string }, { value: T; label: string }]; onChange: (v: T) => void; label: string }) { const i = options.findIndex((o) => o.value === value) return (
{options.map((o) => { const on = o.value === value return ( ) })}
) }