UNPKG

1.37 kBTypeScriptView Raw
1import * as React from "react";
2import { AbstractPureComponent2, IRef } from "../../common";
3import { IntentProps, Props } from "../../common/props";
4export declare type TextAreaProps = ITextAreaProps;
5/** @deprecated use TextAreaProps */
6export interface ITextAreaProps extends IntentProps, Props, React.TextareaHTMLAttributes<HTMLTextAreaElement> {
7 /**
8 * Whether the text area should take up the full width of its container.
9 */
10 fill?: boolean;
11 /**
12 * Whether the text area should appear with large styling.
13 */
14 large?: boolean;
15 /**
16 * Whether the text area should appear with small styling.
17 */
18 small?: boolean;
19 /**
20 * Whether the text area should automatically grow vertically to accomodate content.
21 */
22 growVertically?: boolean;
23 /**
24 * Ref handler that receives HTML `<textarea>` element backing this component.
25 */
26 inputRef?: IRef<HTMLTextAreaElement>;
27}
28export interface ITextAreaState {
29 height?: number;
30}
31export declare class TextArea extends AbstractPureComponent2<TextAreaProps, ITextAreaState> {
32 static displayName: string;
33 state: ITextAreaState;
34 textareaElement: HTMLTextAreaElement | null;
35 private handleRef;
36 componentDidMount(): void;
37 componentDidUpdate(prevProps: TextAreaProps): void;
38 render(): JSX.Element;
39 private handleChange;
40}