How to use @rmwc/menu - 3 common examples

To help you get started, we’ve selected a few @rmwc/menu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fluidtrends / chunky / web / lib / components / Dashboard.js View on Github external
var _this3 = this;

      if (this.props.renderContent) {
        return _react2.default.createElement('div', null);
      }

      return _react2.default.createElement(
        'div',
        { style: {
            alignSelf: 'stretch',
            backgroundColor: this.props.sectionsBackgroundColor,
            textAlign: 'left',
            paddingLeft: '20px'
          } },
        _react2.default.createElement(
          _menu.MenuAnchor,
          { style: {
              padding: '10px'
            } },
          _react2.default.createElement(
            _button.Button,
            {
              style: {
                display: 'flex',
                flexDirection: 'row',
                alignItems: 'center',
                color: this.props.sectionSelectedColor
              },
              onClick: function onClick(evt) {
                return _this3.setState({ 'compactMenuIsOpen': !_this3.state.compactMenuIsOpen });
              } },
            this.props.section.menuTitle,
github fluidtrends / chunky / web / lib / components / Dashboard.js View on Github external
value: function renderCompactSection(section, index) {
      return _react2.default.createElement(
        _menu.MenuItem,
        {
          key: 'section' + index },
        section.menuTitle
      );
    }
  }, {
github fluidtrends / chunky / web / lib / components / Dashboard.js View on Github external
style: {
                display: 'flex',
                flexDirection: 'row',
                alignItems: 'center',
                color: this.props.sectionSelectedColor
              },
              onClick: function onClick(evt) {
                return _this3.setState({ 'compactMenuIsOpen': !_this3.state.compactMenuIsOpen });
              } },
            this.props.section.menuTitle,
            _react2.default.createElement(_icon.Icon, { use: 'expand_more', style: {
                color: this.props.sectionSelectedColor
              } })
          ),
          _react2.default.createElement(
            _menu.SimpleMenu,
            {
              onSelected: this._onCompactSectionSelect,
              open: this.state.compactMenuIsOpen,
              onClose: function onClose(evt) {
                return _this3.setState({ compactMenuIsOpen: false });
              } },
            this.compactSections
          )
        )
      );
    }
  }, {

@rmwc/menu

RMWC Menu component

MIT
Latest version published 2 days ago

Package Health Score

84 / 100
Full package analysis