react-native-navbar-wrapper
v1.0.1
Published
Custom navigation bar for react native
Downloads
12
Maintainers
Readme
react-native-navbar
Navigation bar component for react native
Example Use:-
import NavbarWrapper from 'react-native-navbar-wrapper';
Inside render function
<NavbarWrapper
hasBack={true} // true or false
backPressed={this.backPressed}
show={true} // true or false
title={"App title "}
openMenu={this.openMenu}
closeMenu = {this.closeMenu}
initialRoute={{name:'PageOne', title:'Page One'}}
renderScene={this.renderScene}
setNavigator={ this._setNavigator} //use this function if you want to get navigator reference
configureScene={this.configureScene}
menuItemSelected = {this._menuItemSelected}
isMenuOpen = {true} // true or false
backIcon = {backIcon} // left button icon
menuIcon = {menuIcon} // right button icon
menuItems = {["button1" , "button2" , "button3"]} // buttons in menu
sceneStyle={{}} // style
/>
#Required Properties:- #renderScene
#configureScene
#Optional Properties:-
#hasBack
#setNavigator
style for navigation bar can be passed through this property
navbarStyle : {{}}
Use this to change statusBar color in Android
statusBarColor : 'cyan'
Use this to change status bar style in iOS , Check possible values in official react native doc https://facebook.github.io/react-native/docs/statusbar.html#barstyle
statusBarStyle ={"light-content"}
Menu in right side is optional to set menuIcon pass reference of image in this parameter
menuIcon = {menuIconRef}
List of action button in menu
menuItems = {["button1" , "button2" , "button3"]}