...
 
Commits (4)
...@@ -23,6 +23,11 @@ npm start ...@@ -23,6 +23,11 @@ npm start
React Hamburger Button has only two required props: `open` and `onClick`. React Hamburger Button has only two required props: `open` and `onClick`.
#### include
```js
import { HamburgerButton } from 'react-hamburger-button';
```
#### onClick #### onClick
Note: This prop is passed a `function`. This function will be invoked when the component is `clicked`. The function should responsible for updating the state that is passed to `open`. The function passed to `onClick` could look something like the following: Note: This prop is passed a `function`. This function will be invoked when the component is `clicked`. The function should responsible for updating the state that is passed to `open`. The function passed to `onClick` could look something like the following:
...@@ -38,7 +43,7 @@ handleClick() { ...@@ -38,7 +43,7 @@ handleClick() {
An example use of React Hamburger Menu looks like: An example use of React Hamburger Menu looks like:
```js ```js
<HamburgerMenu <HamburgerButton
open={this.state.open} open={this.state.open}
onClick={this.handleClick.bind(this)} onClick={this.handleClick.bind(this)}
width={18} width={18}
......
{ {
"name": "react-hamburger-button", "name": "react-hamburger-button",
"version": "0.0.1", "version": "0.0.2",
"description": "Simple hamburget button", "description": "Simple hamburger button",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [
"react", "react",
......