ant-design/components/mentions/demo/readonly.tsx
黑雨 8fd6ae54e9
feat: fix support options (#38968)
* feat: fix support options

* feat: update package
2022-11-25 11:12:59 +08:00

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;