UNPKG

@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.

20 lines (17 loc) 678 B
import React, { ChangeEvent, ReactNode } from 'react'; import { FieldError } from 'react-hook-form'; interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> { name: string; onChange: (e: ChangeEvent<HTMLInputElement>) => void; label?: ReactNode; checked?: boolean; inputClassName?: string; labelClassName?: string; errorClassName?: string; disabled?: boolean; error?: boolean | string | { message?: string; } | null | undefined | FieldError; } declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>; export { type CheckboxProps, Checkbox as default };