1.4.4 • Published 6 years ago

nodely-metismenu v1.4.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

NOTE: This project was forked from react-metismenu.

nodely-metismenu

A ready / simple to use, highly customizable, updateable, ajax supported, animated and material designed menu component for React

All features from react-metismenu, including ability to provide item-based context actions.

All information is available here.

Install

npm install --save nodely-metismenu

Extended Usage

With Ecma Script 6 and React Loaders

import React from 'react';
import ReactDOM from 'react-dom';
import MetisMenu from 'react-metismenu';

const buildContextActions = hasSubMenu => () => {
    if (hasSubMenu) {
      // build actions for sub menu root
      return [
        ...
      ]
    }
    // build actions for item
    return [
      ...
    ]
};

ReactDOM.render(<MetisMenu contextActions={buildContextActions}/>, document.getElementById('dom_id'));