1 | import type { TextAreaProps as RcTextAreaProps } from 'rc-textarea';
|
2 | import type { ResizableTextAreaRef } from 'rc-textarea/lib/ResizableTextArea';
|
3 | import * as React from 'react';
|
4 | import type { SizeType } from '../config-provider/SizeContext';
|
5 | import type { InputStatus } from '../_util/statusUtils';
|
6 | import type { InputFocusOptions } from './Input';
|
7 | interface ShowCountProps {
|
8 | formatter: (args: {
|
9 | value: string;
|
10 | count: number;
|
11 | maxLength?: number;
|
12 | }) => string;
|
13 | }
|
14 | export interface TextAreaProps extends RcTextAreaProps {
|
15 | allowClear?: boolean;
|
16 | bordered?: boolean;
|
17 | showCount?: boolean | ShowCountProps;
|
18 | size?: SizeType;
|
19 | disabled?: boolean;
|
20 | status?: InputStatus;
|
21 | }
|
22 | export interface TextAreaRef {
|
23 | focus: (options?: InputFocusOptions) => void;
|
24 | blur: () => void;
|
25 | resizableTextArea?: ResizableTextAreaRef;
|
26 | }
|
27 | declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<TextAreaRef>>;
|
28 | export default TextArea;
|