UNPKG

@barguide/react-hooks

Version:
15 lines (14 loc) 524 B
/// <reference types="react" /> declare type FormCheckboxOnChange = (event: React.ChangeEvent<HTMLInputElement>) => void; interface FormCheckbox { onChange: FormCheckboxOnChange; setValue: (val: boolean) => void; value: boolean; } /** * @name useFormCheckbox * @description A convenience hook for working with text inputs of type checkbox */ declare const useFormCheckbox: (initialValue?: boolean) => FormCheckbox; export { useFormCheckbox }; export type { FormCheckboxOnChange, FormCheckbox };