mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +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;
|