"use client"; import { Button } from "@app/components/ui/button"; import { cn } from "@app/lib/cn"; import type { ReactNode } from "react"; export type OptionSelectOption = { value: TValue; label: string; icon?: ReactNode; }; type OptionSelectProps = { options: ReadonlyArray>; value: TValue; onChange: (value: TValue) => void; label?: string; /** Grid columns: 2, 3, 4, 5, etc. Default 5 on md+. */ cols?: number; className?: string; disabled?: boolean; }; export function OptionSelect({ options, value, onChange, label, cols = 5, className, disabled = false }: OptionSelectProps) { return (
{label && (

{label}

)}
{options.map((option) => { const isSelected = value === option.value; return ( ); })}
); }