import { DetailedHTMLProps, forwardRef, InputHTMLAttributes } from "react"; import { cn } from "@/lib/utils"; type RadioItem = { value: string; label: string; }; interface RadioProps extends DetailedHTMLProps< InputHTMLAttributes, HTMLInputElement > { name: string; items: RadioItem[]; label?: string; className?: string; } export const Radio = forwardRef( ({ items, label, className, value, ...props }, ref) => ( {label !== undefined && ( {label} )} {items.map((item) => ( {item.label} ))} ) ); Radio.displayName = "Radio";