Skip to content

elifTech/react-context-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React.js Context-Menu

Demo & Examples

Live demo: elifTech.github.io/react-context-menu

Installation

The easiest way to use react-menu is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).

You can also use the standalone build by including dist/react-menu.js in your page. If you use this, make sure you have already included React, and it is available as a global variable.

npm install react-menu --save

Usage

EXPLAIN USAGE HERE

var ContextMenu = require('react-context-menu');

let data = {
    selector: 'context-menu',
    className: 'well',
    callback: function(e) {
        e.preventDefault();
        console.log(e.target.textContent);
        alert("Clicked on " + e.target.textContent);
    },
    items: [
        {name: "Edit", icon: "edit"},
        {name: "Cut", icon: "cut"},
        {name: "Copy", icon: "copy"},
        {name: "Paste", icon: "paste"},
        {name: "Delete", icon: "delete"},
        {name: "", icon: ""},
        {name: "Quit", icon: "quit"}
    ]
};


React.render(
    <ContextMenu options={data} />,
    document.getElementById(data.selector)
);

Properties

  • DOCUMENT PROPERTIES HERE

Notes

ADDITIONAL USAGE NOTES

License

PUT LICENSE HERE

Copyright (c) 2016 ElifTech.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published