import type { ReactNode } from "react"; import { cn } from "./cn.js"; export interface SegmentedItem { value: T; label: string; icon?: ReactNode; disabled?: boolean; } export type SegmentedControlSize = "default" | "dense"; export interface SegmentedControlProps { value: T; items: Array>; label: string; size?: SegmentedControlSize; className?: string; onChange: (value: T) => void; } export function SegmentedControl({ value, items, label, size = "default", className, onChange, }: SegmentedControlProps) { return (
{items.map((item) => ( ))}
); }