Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (30 sloc) 803 Bytes

Menu

See the demo component here

Usage

Below, an example of using the Menu component:

import { Button, Menu } from 'mdwrapper';

const Demo = () => (
  <>
    <div id="menu-anchor">
      <Button onClick={() => this.setState({ display: true })}>
        Show
      </Button>
      <Menu
        open={this.state.display}
        data={['First', 'Second', '', 'Third', 'Four']}
        onClick={label => {
          console.log(label);
          this.setState({ display: false });
        }} />
    </div>
  </>
);

Props

List of all properties for the Menu component:

Prop Type Default Description
data array [] Data
onClick function void Click Trigger
open boolean false Open
You can’t perform that action at this time.