colby-nav
v1.0.8
Published
A React component do display a navbar and a menu drawer for Colby College websites.
Downloads
4
Readme
colby-nav
A React component do display a navbar and a menu drawer for Colby College websites.
Usage
As an ES6 module
npm install --save colby-nav
import React from 'react';
import ColbyNav from 'colby-nav';
const YourComponent = (props) =>
<ColbyNav
{...props}
/>
);
Props
doMenuToggler: PropTypes.bool, // Include the button that toggles the menu drawer?
extraLink: PropTypes.string, // The URL of an extra link to display to the right of the logo.
extraTitle: PropTypes.string, // The text of the extra link.
menuActive: PropTypes.bool, // Is the menu drawer open?
menuItems: PropTypes.arrayOf(PropTypes.any), // WordPress nav items for the site menu.
globalMenuItems: PropTypes.arrayOf(PropTypes.any), // WordPress nav items for the global menu.
extraTopComponent: PropTypes.objectOf(PropTypes.any), // An extra React component to go at the top of the top of the menu drawer.
setMenuActive: PropTypes.func, // A function to toggle the menu drawer.
Defaults
doMenuToggler: true,
extraLink: null,
extraTitle: null,
extraTopComponent: null,
menuItems: [],
globalMenuItems: [],
menuActive: null,
setMenuActive: null,