Package Exports
- react-birch-context-menu
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-birch-context-menu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-birch-context-menu
Custom context (right click) menu for react. Forked from context-menu and ported to React Hooks and styled-components
Motivation and enhancements
- Included as a core dependency of
react-birchdirectly in the mono repository - Converted to use
React Hooksthroughout instead of ReactComponent - Added styling and theming based on
styled-componentsinstead of being hard-coded and limited to only light and dark - css and sass converted to
styled-components - Uses React
createPortaland creates a standalonedivadjacent to and after the main component tree (eliminated need to useReactDOM.rendertwice in one app - Eliminated reliance on singleton classes and instead uses React Context accessed through React Hooks
- Uses VSCode extension style API for configuration of menu items and groups
We use react-birch-context-menu and react-birch as drop in replacements for the VSCode TreeView and VSCode context menu / keyboard bindings in production apps based on the monaco editor.
Simple usage
Install
$ npm install react-birch-context-menu