react-nested-nav
React nested navigation menu
Install
npm install --save react-nested-nav
Usage
Format your data
const MenuShape = title: PropTypesstring id: PropTypesstringconst ItemsShape = text: PropTypesstringisRequired link: PropTypesstringItemsShapemenu = PropTypesMenuShapeitems = PropTypesNestedNavpropTypes = menus: PropTypes onLinkClick: PropTypesfunc
import React from 'react' import NestedNav from 'react-nested-nav'import data from './data' // see data formattingimport 'react-nested-nav/dist/index.css' // custom css const App = return <NestedNav = = />
License
MIT © UseAllFive