mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 17:59:57 +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;
|