mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 08:59:15 +08:00
8fd6ae54e9
* feat: fix support options * feat: update package
30 lines
576 B
TypeScript
30 lines
576 B
TypeScript
import React from 'react';
|
|
import { Mentions } from 'antd';
|
|
|
|
const options = ['afc163', 'zombiej', 'yesmeck'].map((value) => ({
|
|
value,
|
|
key: value,
|
|
label: value,
|
|
}));
|
|
|
|
const App: React.FC = () => (
|
|
<>
|
|
<div style={{ marginBottom: 10 }}>
|
|
<Mentions
|
|
style={{ width: '100%' }}
|
|
placeholder="this is disabled Mentions"
|
|
disabled
|
|
options={options}
|
|
/>
|
|
</div>
|
|
<Mentions
|
|
style={{ width: '100%' }}
|
|
placeholder="this is readOnly Mentions"
|
|
readOnly
|
|
options={options}
|
|
/>
|
|
</>
|
|
);
|
|
|
|
export default App;
|