import type { Simplify } from 'type-fest'; import { Label } from '../Label/Label.tsx'; import { RadioGroup } from '../RadioGroup/RadioGroup.tsx'; import { FieldGroup } from './FieldGroup/FieldGroup.tsx'; import type { BaseFieldComponentProps } from './types.ts'; export type BaseRadioFieldProps = Simplify< BaseFieldComponentProps & { description?: string; disabled?: boolean; label: string; options: { [K in T]: string }; } >; export const BaseRadioField = ({ description, disabled, error, label, name, options, readOnly, setValue, value }: BaseRadioFieldProps) => { return ( setValue(value as T)}> {Object.keys(options).map((option) => (
))}
); };