UNPKG

reablocks

Version:
46 lines (44 loc) 1.21 kB
import { TextareaTheme } from './TextareaTheme'; import { TextareaAutosizeProps } from 'react-textarea-autosize'; import { RefObject } from 'react'; export interface TextareaProps extends TextareaAutosizeProps { /** * Additional classname for the input container element. */ containerClassName?: string; /** * Mark field as errored */ error?: boolean; /** * If true, the field will take up the full width of its container. */ fullWidth?: boolean; /** * Size of the field. */ size?: 'small' | 'medium' | 'large' | string; /** * Theme for the Textarea. */ theme?: TextareaTheme; } export interface TextAreaRef { /** * Reference to the input element. */ inputRef?: RefObject<HTMLTextAreaElement>; /** * Reference to the container element. */ containerRef?: RefObject<HTMLDivElement>; /** * Method to blur the input element. */ blur?: () => void; /** * Method to focus the input element. */ focus?: () => void; } export declare const Textarea: import('react').ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<TextAreaRef>>;