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.

52 lines (49 loc) 1.57 kB
import React, { FocusEvent } from 'react'; import { FieldError } from 'react-hook-form'; type TextAreaProps = { name: string; onChange: (e: { target: { name: string; value: string; }; }) => void; value?: string; label?: string | null; placeholder?: string | null; disabled?: boolean; autoGrow?: boolean; disableShrink?: boolean; inputClassName?: string; labelClassName?: string; errorClassName?: string; onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void; onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void; error?: boolean | string | { message?: string; } | null | undefined | FieldError; } & React.TextareaHTMLAttributes<HTMLTextAreaElement>; declare const TextArea: React.ForwardRefExoticComponent<{ name: string; onChange: (e: { target: { name: string; value: string; }; }) => void; value?: string; label?: string | null; placeholder?: string | null; disabled?: boolean; autoGrow?: boolean; disableShrink?: boolean; inputClassName?: string; labelClassName?: string; errorClassName?: string; onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void; onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void; error?: boolean | string | { message?: string; } | null | undefined | FieldError; } & React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>>; export { type TextAreaProps, TextArea as default };