1.0.10 • Published 2 years ago

react-jsx-context-menu v1.0.10

Weekly downloads
10
License
MIT
Repository
github
Last release
2 years ago

NPM

react-jsx-context-menu

Installation

Using npm:

npm install --save react-jsx-context-menu

Using yarn:

yarn add react-jsx-context-menu

Usage

Here is a simple example of how to use:

import React from 'react';
import { render } from 'react-dom';
import ContextMenu from 'react-jsx-context-menu';

function App() {
  return (
    <div>
      <ContextMenu
        menu={
          <div
            style={{
              display: 'flex',
              flexDirection: 'column',
            }}
          >
            <button>Button 1</button>
            <button>Button 2</button>
          </div>
        }
      >
        <div>
          Right click me to see the context menu
        </div>
      </ContextMenu>
    </div>
  );
}
render(<App />, document.getElementById('root'));

You can play around with it here: https://codesandbox.io/s/5mxow9wkon

License

MIT

1.0.10

2 years ago

1.0.9

3 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago