52 lines
787 B
Plaintext
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} />
|
|
```
|