ant-design/components/input/demo/textarea-show-count.tsx
afc163 0cca743a9e
docs: fix TextArea showCount demo (#38849)
* docs: fix TextArea showCount demo

* chore: update snapshot
2022-11-22 17:02:07 +08:00

30 lines
594 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, marginBottom: 24 }}
onChange={onChange}
placeholder="can resize"
/>
<TextArea
showCount
maxLength={100}
style={{ height: 120, resize: 'none' }}
onChange={onChange}
placeholder="disable resize"
/>
</>
);
export default App;