import type { LucideIcon } from "lucide-react"; import { cn } from "@/lib/utils"; /** * Icon-only sibling of SegmentedControl: switches a chart's visual form * (line/bar, donut/bubbles) rather than its data range, so it reads as a * distinct, smaller control next to the period switcher rather than a second * one of the same kind. */ export function ChartTypeToggle({ options, value, onChange, label, className, }: { options: readonly { value: T; icon: LucideIcon; label: string }[]; value: T; onChange: (value: NoInfer) => void; label: string; className?: string; }) { return (
{options.map((o) => ( ))}
); }