import { cn } from "@/util/utils"; type Option = { label: string; value: string; }; type Props = { options: Option[]; value: string; onChange: (value: string) => void; }; function SwitchBar({ options, value, onChange }: Props) { return (
{options.map((option) => { const selected = option.value === value; return (
{ if (!selected) { onChange(option.value); } }} > {option.label}
); })}
); } export { SwitchBar };