File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed
Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 1- # react-context-menu
1+ # π react-context-menu
2+
3+ ## Installation
4+
5+ ``` bash
6+ npm i --save @totase/react-context-menu
7+ ```
8+
9+ ## Usage
10+
11+ All components are exported from the main component, ` ContextMenu ` , so that's the only one needed to import.
12+
13+ ``` tsx
14+ import { ContextMenu } from ' @totase/react-context-menu' ;
15+
16+ ...
17+
18+ return (
19+ <>
20+ <div id = " context-menu-trigger" >I will trigger the menu when right clicked<div >
21+
22+ <ContextMenu triggerId = " context-menu-trigger" >
23+ <ContextMenu.Item onClick = { () => console .log (" what up" )} >Item 1</ContextMenu.Item >
24+ <ContextMenu.Item disabled >Disabled item</ContextMenu.Item >
25+ <ContextMenu.Separator />
26+ <ContextMenu.Item onClick = { () => console .log (" what up" )} >Item 3</ContextMenu.Item >
27+ </ContextMenu >
28+ </>
29+ )
30+
31+ ```
32+
33+ ## License
34+
35+ react-context-menu is licensed under MIT.
You canβt perform that action at this time.
0 commit comments