import type { ComponentChildren } from "preact"; import { useUniqueName } from "./hooks"; interface FormRadioProps { name: string; currentValue?: string; values: { value: string; label: string | ComponentChildren; }[]; onChange(newValue: string): void; } export default function FormRadioGroup({ values, ...restProps }: FormRadioProps) { return ( <> {(values || []).map(({ value, label }) => (