reachtokish / rctx-contextmenu

:bowtie: :sparkles: Context menu for React
https://reachtokish.github.io/rctx-contextmenu/
67 stars 15 forks source link

On left click trigger #26

Closed Patrickroelofs closed 2 years ago

Patrickroelofs commented 3 years ago

What: I've added a boolean value for the Left mouse button, if this is set to true, the ContextMenuTrigger will not respond to right clicks, but left clicks. I've also updated the example files, so that there's a left-click example. This can be removed if needed.

Why: This lowers the amount of bloat in a personal project im working on, this simple addition removes the need for left-click menu's as this package will be able to support it instead.

How: I've added a boolean value to the <ContextMenuTrigger /> function, if this is set to true (onLeftClick) the context menu will trigger on Left Click instead of Right Click.

Checklist:

If you have any feedback i'd love to hear it 👍