import React, { ChangeEvent, FocusEvent, KeyboardEvent, ReactNode } from 'react'; import { UseFormProps } from 'react-hook-form'; import { FieldValidationMethodType } from '../../types'; export interface TextAreaProps { /** * If the input should allow autofilling from the browser. This is not always handled properly in Chrome, so we suggest to use a string like 'nope'. */ autoComplete?: string; /** * The function to run when the input loses focus/blurred. */ onBlur?: (e: FocusEvent) => void; /** * A function that will run after the input has changed, it will return the value of the input for you to use in the parent component. */ onChange?: (e: ChangeEvent) => void; onFocus?: (e: FocusEvent) => void; /** * Should the input be disabled or not. Use with a state var to determine when the input can be edited. */ disabled?: boolean; /** * An error message to be shown docked at the bottom of the input. If null, nothing will show. */ error?: string; /** * An id to be added to the input itself, not the wrapping label. */ id: string; /** * Classes to be added to the `