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