Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-menus

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-menus

React Menu Component

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
302
increased by51.76%
Maintainers
1
Weekly downloads
 
Created
Source

react-menus

React Menu Component

Install

$ npm install --save react-menus

Usage

var items = [
    {
        label: 'hello',
        fn: function() {
            console.log('well, hello')
        }
    },
    {
        label: 'hi'
    }
]

var App = React.createClass({

    render: function() {
        return <Menu items={items} onClick={this.handleClick}/>
    },

    handleClick: function(item) {
        console.log('clicked ', item.label)
    }
})

React.render(<App />, document.body)

Properties

  • items: Object[]
  • onClick: Function(item, index, event)
  • rowStyle: Object
  • columnStyle: Object
  • columns: String[] - defaults to ['label']

For every item in the items property, a row will be rendered, with all the columns specified in props.columns. Every column displays the value in item[<column_name>].

Every item can optionally have a fn property, which is called when the item is clicked.

License

MIT

Keywords

FAQs

Package last updated on 12 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc