import { type ReactNode } from "react"; import styles from "./index.module.css"; export interface SegmentedControlOption { value: string; label: ReactNode; } export interface SegmentedControlProps { options: readonly SegmentedControlOption[]; value: string; onValueChange(value: string): void; size?: "regular" | "minor"; variant?: "solid" | "underline"; } export function SegmentedControl({ options, value, onValueChange, size = "regular", variant = "solid", }: SegmentedControlProps) { const selectedIndex = options.findIndex((option) => option.value === value); const segmentWidth = 100 / options.length; return (
); }