@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.
31 lines (28 loc) • 904 B
text/typescript
import React from 'react';
import { FieldError } from 'react-hook-form';
interface Option {
value: string | number;
label: string | React.ReactNode;
}
interface CheckboxGroupProps {
name: string;
onChange: (event: {
target: {
name: string;
value: (string | number)[];
};
}) => void;
value?: (string | number)[];
options: Option[];
label?: string | React.ReactNode | null;
inputClassName?: string | null;
labelClassName?: string | null;
optionLabelClassName?: string | null;
errorClassName?: string | null;
disabled?: boolean;
error?: boolean | string | {
message?: string;
} | null | undefined | FieldError;
}
declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLInputElement>>;
export { type CheckboxGroupProps, CheckboxGroup as default };