简体   繁体   中英

IconMenu doesn't appear in material-ui

I'm using material-ui . I tried to implement Icon Menu . My component:

import React from 'react';
import {IconMenu} from 'material-ui';
import MenuItem from 'material-ui/lib/menus/menu-item';

export default React.createClass({
  render() {
    return (
      <IconMenu
        iconButtonElement={<div>Tried IconButton instead if this div here</div>}
        >
        <MenuItem primaryText='Logout' />
      </IconMenu>
    )
  }
});

When I click on icon button element (div with text in this case) nothing happens. What an I doing wrong?

My bad. I forgot to include React-Tap-Event-Plugin that is required .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM