mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 09:21:22 +08:00
30 lines
576 B
TypeScript
30 lines
576 B
TypeScript
|
import React from 'react';
|
||
|
import { Input } from 'antd';
|
||
|
|
||
|
const { TextArea } = Input;
|
||
|
|
||
|
const onChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
||
|
console.log('Change:', e.target.value);
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<>
|
||
|
<TextArea
|
||
|
showCount
|
||
|
maxLength={100}
|
||
|
style={{ height: 120 }}
|
||
|
onChange={onChange}
|
||
|
placeholder="can resize"
|
||
|
/>
|
||
|
<TextArea
|
||
|
showCount
|
||
|
maxLength={100}
|
||
|
style={{ height: 120, resize: 'none' }}
|
||
|
onChange={onChange}
|
||
|
placeholder="disable resize"
|
||
|
/>
|
||
|
</>
|
||
|
);
|
||
|
|
||
|
export default App;
|