navpush
Install
npm install --save navpush
Example
import React Component from 'react'; import 'navpush/dist/styles/Hamburger.css';import 'navpush/dist/styles/PushRight.css';import PushRight Hamburger from 'navpush'; { // navpush should go at the top of your body return <PushRight = = > isOpen toggle // Place your page's content (elements that are not fixed) as children. return <section ="hero">Hello World!</section>; </PushRight> ; } ;
Styling
CSS Modules are supported by
importing the navpush/styles/*.module.scss
files of your choice and passing
them to the relevant component(s) as props. Here is an example of using the
Hamburger
and OverlayLeft
themes
import React Component from 'react'; import HamburgerTheme from 'navpush/dist/styles/Hamburger.module.scss';import Theme from 'navpush/dist/styles/PushRight.module.scss';import OverlayLeft Hamburger from 'navpush'; { return <OverlayLeft = = > isOpen toggle <div> <header> <Hamburger = = /> </header> <section ="hero">Hello World!</section>; </div> </OverlayLeft> ; } ;
License
MIT