@start-base/react-form-elements
Version:
Simplify form elements and form management. Selection of user friendly inputs and wide customization abilities to match your design and functionality.
26 lines (23 loc) • 772 B
text/typescript
import React from 'react';
import { FieldError } from 'react-hook-form';
interface Option {
value: string;
label: string | React.ReactNode;
}
interface RadioGroupProps {
name: string;
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
value?: string | null;
options: Option[];
label?: string | React.ReactNode;
inputClassName?: string;
labelClassName?: string;
optionLabelClassName?: string;
errorClassName?: string;
disabled?: boolean;
error?: boolean | string | {
message?: string;
} | null | undefined | FieldError;
}
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLInputElement>>;
export { type RadioGroupProps, RadioGroup as default };