mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-30 04:18:28 +08:00
20 lines
449 B
TypeScript
20 lines
449 B
TypeScript
|
import React from 'react';
|
||
|
import { Input } from 'antd';
|
||
|
|
||
|
const { TextArea } = Input;
|
||
|
|
||
|
const onChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
||
|
console.log(e);
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<>
|
||
|
<Input placeholder="input with clear icon" allowClear onChange={onChange} />
|
||
|
<br />
|
||
|
<br />
|
||
|
<TextArea placeholder="textarea with clear icon" allowClear onChange={onChange} />
|
||
|
</>
|
||
|
);
|
||
|
|
||
|
export default App;
|