Skip to content

Commit 5d1a32d

Browse files
authored
docs: remove stale Input.TextArea references (#165)
1 parent 6420856 commit 5d1a32d

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,47 +40,47 @@ render(<Input placeholder="input" allowClear />, mountNode);
4040
```
4141

4242
```js
43-
import Input from '@rc-component/input';
43+
import { TextArea } from '@rc-component/input';
4444
import { render } from 'react-dom';
4545

46-
render(<Input.TextArea autoSize showCount />, mountNode);
46+
render(<TextArea autoSize showCount />, mountNode);
4747
```
4848

4949
## API
5050

51-
| Property | Type | Default | Description |
52-
| --------------------- | ------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53-
| prefixCls | string | rc-input | |
54-
| className | string | '' | additional class name of input |
55-
| style | React.CSSProperties | | style properties of input |
56-
| affixWrapperClassName | string | - | className with '@rc-component/input-affix-wrapper' |
57-
| groupClassName | string | - | className with '@rc-component/input-group-wrapper' |
58-
| wrapperClassName | string | - | className with '@rc-component/input-wrapper' |
59-
| addonAfter | ReactNode | - | The label text displayed after (on the right side of) the input field |
60-
| addonBefore | ReactNode | - | The label text displayed before (on the left side of) the input field |
61-
| allowClear | boolean &#124; { clearIcon: ReactNode } | false | If allow to remove input content with clear icon |
62-
| bordered | boolean | true | Whether has border style |
63-
| defaultValue | string | - | The initial input content |
64-
| disabled | boolean | false | Whether the input is disabled |
65-
| id | string | - | The ID for input |
66-
| maxLength | number | - | The max length |
67-
| showCount | boolean &#124; { formatter: ({ value: string, count: number, maxLength?: number }) => ReactNode } | false | Whether show text count |
68-
| prefix | ReactNode | - | The prefix icon for the Input |
69-
| suffix | ReactNode | - | The suffix icon for the Input |
70-
| type | string | `text` | The type of input, see: [MDN](https://developer.mozilla.org/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types)( use `Input.TextArea` instead of `type="textarea"`) |
71-
| value | string | - | The input content value |
72-
| onChange | function(e) | - | Callback when user input |
73-
| onPressEnter | function(e) | - | The callback function that is triggered when Enter key is pressed |
51+
| Property | Type | Default | Description |
52+
| --------------------- | ------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
53+
| prefixCls | string | rc-input | |
54+
| className | string | '' | additional class name of input |
55+
| style | React.CSSProperties | | style properties of input |
56+
| affixWrapperClassName | string | - | className with '@rc-component/input-affix-wrapper' |
57+
| groupClassName | string | - | className with '@rc-component/input-group-wrapper' |
58+
| wrapperClassName | string | - | className with '@rc-component/input-wrapper' |
59+
| addonAfter | ReactNode | - | The label text displayed after (on the right side of) the input field |
60+
| addonBefore | ReactNode | - | The label text displayed before (on the left side of) the input field |
61+
| allowClear | boolean &#124; { clearIcon: ReactNode } | false | If allow to remove input content with clear icon |
62+
| bordered | boolean | true | Whether has border style |
63+
| defaultValue | string | - | The initial input content |
64+
| disabled | boolean | false | Whether the input is disabled |
65+
| id | string | - | The ID for input |
66+
| maxLength | number | - | The max length |
67+
| showCount | boolean &#124; { formatter: ({ value: string, count: number, maxLength?: number }) => ReactNode } | false | Whether show text count |
68+
| prefix | ReactNode | - | The prefix icon for the Input |
69+
| suffix | ReactNode | - | The suffix icon for the Input |
70+
| type | string | `text` | The type of input, see: [MDN](https://developer.mozilla.org/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types) (use the named `TextArea` export instead of `type="textarea"`) |
71+
| value | string | - | The input content value |
72+
| onChange | function(e) | - | Callback when user input |
73+
| onPressEnter | function(e) | - | The callback function that is triggered when Enter key is pressed |
7474

7575
## TextArea
7676

77-
`rc-textarea` has been migrated into `@rc-component/input`. Use `Input.TextArea` or the named `TextArea` export for all textarea-related features.
77+
`rc-textarea` has been migrated into `@rc-component/input`. Use the named `TextArea` export for all textarea-related features.
7878

7979
```js
80-
import Input, { TextArea } from '@rc-component/input';
80+
import { TextArea } from '@rc-component/input';
8181

82-
<Input.TextArea allowClear autoSize />;
8382
<TextArea showCount maxLength={100} />;
83+
<TextArea allowClear autoSize />;
8484
```
8585

8686
| Property | Type | Default | Description |
@@ -126,7 +126,7 @@ useEffect(() => {
126126
console.log(textareaRef.current.resizableTextArea);
127127
}, []);
128128

129-
<Input.TextArea ref={textareaRef} />;
129+
<TextArea ref={textareaRef} />;
130130
```
131131

132132
| Property | Type | Description |

0 commit comments

Comments
 (0)