mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 08:39:07 +08:00
25 lines
590 B
TypeScript
25 lines
590 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { CloseSquareFilled } from '@ant-design/icons';
|
||
|
import { Mentions } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [value, setValue] = useState('hello world');
|
||
|
return (
|
||
|
<>
|
||
|
<Mentions value={value} onChange={setValue} allowClear />
|
||
|
<br />
|
||
|
<br />
|
||
|
<Mentions
|
||
|
value={value}
|
||
|
onChange={setValue}
|
||
|
allowClear={{ clearIcon: <CloseSquareFilled /> }}
|
||
|
/>
|
||
|
<br />
|
||
|
<br />
|
||
|
<Mentions value={value} onChange={setValue} allowClear rows={3} />
|
||
|
</>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default App;
|