ohif-viewer/platform/docs/docs/component-library/components/ContextMenu.mdx
2021-07-13 23:48:16 +02:00

52 lines
787 B
Plaintext

---
name: Context Menu
menu: General
route: components/contextMenu
---
import { ContextMenu } from '@ohif/ui';
# Context Menu
...
## Import
```javascript
import { ContextMenu } from '@ohif/ui';
```
```jsx live
{
() => {
const items = [
{
label: 'Delete measurement',
actionType: 'Delete',
action: () => alert('Delete'),
},
{
label: 'Relabel',
actionType: 'setLabel',
action: () => alert('Relabel'),
},
{
label: 'Add Description',
actionType: 'setDescription',
action: () => alert('Add Description'),
},
];
return (
<div className="p-4">
<ContextMenu items={items} />
</div>
);
};
}
```
## Properties
<Props of={ContextMenu} />
```