mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 15:59:38 +08:00
27 lines
615 B
TypeScript
27 lines
615 B
TypeScript
|
import React from 'react';
|
||
|
import { Mentions } from 'antd';
|
||
|
|
||
|
const { Option } = Mentions;
|
||
|
|
||
|
const getOptions = () =>
|
||
|
['afc163', 'zombiej', 'yesmeck'].map(value => (
|
||
|
<Option key={value} value={value}>
|
||
|
{value}
|
||
|
</Option>
|
||
|
));
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<>
|
||
|
<div style={{ marginBottom: 10 }}>
|
||
|
<Mentions style={{ width: '100%' }} placeholder="this is disabled Mentions" disabled>
|
||
|
{getOptions()}
|
||
|
</Mentions>
|
||
|
</div>
|
||
|
<Mentions style={{ width: '100%' }} placeholder="this is readOnly Mentions" readOnly>
|
||
|
{getOptions()}
|
||
|
</Mentions>
|
||
|
</>
|
||
|
);
|
||
|
|
||
|
export default App;
|