1.1.2 • Published 3 years ago

@ktno/react-hamburgers v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-hamburgers

React component for Jonathan Suh's hamburguers (https://jonsuh.com/hamburgers/)

  • Install this package with:
npm i -S react-hamburgers
import React from 'react';
import Hamburger from 'react-hamburgers';

export default class MyComponent extends React.Component {

  constructor(props) {
    super(props);
    this.state = { active: false };
  }

  render() {
    return (
      <div>
        <Hamburger
          active={this.state.active}
          type="slider"
          onClick={() => this.setState({ active: !this.state.active })}
        >
      </div>
    );
  }
}