mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
6af1d95cf4
* docs: init * chore: update example * test: update test * docs: update doc * chore: fix lint * chore: update limit
25 lines
628 B
TypeScript
25 lines
628 B
TypeScript
import React from 'react';
|
|
import { Flex, Input } from 'antd';
|
|
|
|
const { TextArea } = Input;
|
|
|
|
const onChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
|
console.log('Change:', e.target.value);
|
|
};
|
|
|
|
const App: React.FC = () => (
|
|
<Flex vertical gap={32}>
|
|
<Input showCount maxLength={20} onChange={onChange} />
|
|
<TextArea showCount maxLength={100} onChange={onChange} placeholder="can resize" />
|
|
<TextArea
|
|
showCount
|
|
maxLength={100}
|
|
onChange={onChange}
|
|
placeholder="disable resize"
|
|
style={{ height: 120, resize: 'none' }}
|
|
/>
|
|
</Flex>
|
|
);
|
|
|
|
export default App;
|