New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-menu

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-menu - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

7

CHANGELOG.md

@@ -0,1 +1,8 @@

v0.0.3 - Sat, 11 Oct 2014 20:51:58 GMT
--------------------------------------
- [984104a](../../commit/984104a) [added] basic examples in README
- [5be176c](../../commit/5be176c) [fixed] issue where components not exposed
v0.0.2 - Sat, 11 Oct 2014 20:11:06 GMT

@@ -2,0 +9,0 @@ --------------------------------------

7

lib/index.js

@@ -1,1 +0,6 @@

module.exports = require('./components/Menu');
var Menu = require('./components/Menu');
Menu.MenuTrigger = require('./components/MenuTrigger');
Menu.MenuOptions = require('./components/MenuOptions');
Menu.MenuOption = require('./components/MenuOption');
module.exports = Menu;

4

package.json
{
"name": "react-menu",
"version": "0.0.2",
"version": "0.0.3",
"description": "Accessible menu component for React.JS",
"main": "./modules/index",
"main": "./lib/index",
"repository": {

@@ -7,0 +7,0 @@ "type": "git",

# react-menu
[wip] Accessible menu component built for React.JS
An accessible menu component built for React.JS
## Basic Usage
```html
/** @jsx React.DOM */
var react = require('react');
var Menu = require('react-menu');
var MenuTrigger = Menu.MenuTrigger;
var MenuOptions = Menu.MenuOptions;
var MenuOption = Menu.MenuOption;
var App = React.createClass({
render: function() {
return (
<Menu className='myMenu'>
<MenuTrigger>
</MenuTrigger>
<MenuOptions>
<MenuOption>
1st Option
</MenuOption>
<MenuOption onSelect={this.someHandler}>
2nd Option
</MenuOption>
<div className='a-non-interactive-menu-item'>
non-selectable item
</div>
<MenuOption disabled={true} onDisabledSelect={this.otherHanlder}>
diabled option
</MenuOption>
</MenuOptions>
</Menu>
);
}
});
React.renderComponent(<App />, document.body);
```
For a working example see the `examples/basic` example
## Styles
Bring in default styles by calling `injectCSS` on the `Menu` component.
```javascript
var Menu = require('react-menu');
Menu.injectCSS();
```
Default styles will be added to the top of the head, and thus any styles you write will override any of the defaults.
The following class names are used / available for modification in your own stylsheets:
```
.Menu
.Menu__MenuTrigger
.Menu__MenuOptions
.Menu__MenuOption
```
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