UNPKG

@barguide/react-hooks

Version:
15 lines (14 loc) 499 B
/// <reference types="react" /> declare type FormInputOnChange = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void; interface FormInput { onChange: FormInputOnChange; setValue: (val: string) => void; value: string; } /** * @name useFormInput * @description A convenience hook for working with text inputs */ declare const useFormInput: (initialValue?: string) => FormInput; export { useFormInput }; export type { FormInputOnChange, FormInput };