0.1.6 • Published 3 years ago

drawer-navigation v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

About

drawer-navigation is a drawer navigation solution for react web apps.

Getting Started

Install the pacakage :

npm i drawer-navigation
yarn add drawer-navigation

Include in your project

import Drawer from 'drawer-navigation/Drawer
<Drawer
routes={[{url:"/",component:<Home/>,label:"Home"},{url:"/shop",component:<h1>About</h1>,label:"Shop"}]}
mainContainerStyles={{
  display:"flex",
  flexDirection:"column",
  justifyContent:"center",
  alignItems:"center",
  width:"100%",
  height:"100%"
}}
hamburgerIconColor="red"
drawerCloseColor="orange"
drawerBackgroundColor="blue"
drawerLabelsStyle={{border:"2.5px solid orange",width:"auto",color:"orange",fontFamily:"monospace",padding:12,margin:2}}
/>

Props

PropsDetailsExample
routestakes an array of objects:{url:"/your-page",component<YourPage/>,label:"Your Page"}
mainContainerStylesStyles the containing element that holds the main view takes a styles object : {width:200,height:200}
drawerLabelsStyleStyles the drawer element that holds the main view takes a styles object : {width:200,height:200}
hamburgerIconColorcolor for the hamburger icon that opens teh drawer , takes a string"red"
drawerCloseColorcolor for the close drawer icon that closes the drawer , takes a string"orange"
drawerBackgroundColordrawer background color , takes a string"green"

Examples

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago