import type { ReactNode } from "react"; import { cn, segmentedClass } from "@/lib/ui/variants"; export interface SegmentOption { value: T; label: ReactNode; } interface SegmentedControlProps { options: Array>; value: T; onChange: (value: T) => void; ariaLabel: string; className?: string; } export function SegmentedControl({ options, value, onChange, ariaLabel, className, }: SegmentedControlProps) { return (
{options.map((option) => { const selected = option.value === value; return ( ); })}
); }