mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 20:19:44 +08:00
27 lines
617 B
TypeScript
27 lines
617 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;
|