UNPKG

2.01 kBTypeScriptView Raw
1import * as React from 'react';
2import { HTMLProps } from 'react';
3export declare enum TextAreResizeOrientation {
4 horizontal = "horizontal",
5 vertical = "vertical",
6 both = "both"
7}
8export interface TextAreaProps extends Omit<HTMLProps<HTMLTextAreaElement>, 'onChange' | 'ref'> {
9 /** Additional classes added to the TextArea. */
10 className?: string;
11 /** Flag to show if the TextArea is required. */
12 isRequired?: boolean;
13 /** Flag to show if the TextArea is disabled. */
14 isDisabled?: boolean;
15 /** Flag to show if the TextArea is read only. */
16 isReadOnly?: boolean;
17 /** Use the external file instead of a data URI */
18 isIconSprite?: boolean;
19 /** Flag to modify height based on contents. */
20 autoResize?: boolean;
21 /** Value to indicate if the textarea is modified to show that validation state.
22 * If set to success, textarea will be modified to indicate valid state.
23 * If set to error, textarea will be modified to indicate error state.
24 */
25 validated?: 'success' | 'warning' | 'error' | 'default';
26 /** Value of the TextArea. */
27 value?: string | number;
28 /** A callback for when the TextArea value changes. */
29 onChange?: (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
30 /** Sets the orientation to limit the resize to */
31 resizeOrientation?: 'horizontal' | 'vertical' | 'both';
32 /** Custom flag to show that the TextArea requires an associated id or aria-label. */
33 'aria-label'?: string;
34 /** A reference object to attach to the textarea. */
35 innerRef?: React.RefObject<any>;
36}
37export declare class TextAreaBase extends React.Component<TextAreaProps> {
38 static displayName: string;
39 static defaultProps: TextAreaProps;
40 constructor(props: TextAreaProps);
41 private handleChange;
42 render(): JSX.Element;
43}
44export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLInputElement>>;
45//# sourceMappingURL=TextArea.d.ts.map
\No newline at end of file