react-native-toolbar-wrapper

1.1.5 • Public • Published

Toolbar

component acts like toolbar in react-native. You can make menus by setting the actions array,and you can get which menu has been pressed by register onPress callback. width option is required.

Install

Make sure that you are in your React Native project directory and run:

npm install react-native-toolbar-wrapper --save

Usage

Import Toolbar as a JavaScript module:

import {Toolbar,OPTION_SHOW,OPTION_NEVER,ACTION_ADD} from 'react-native-toolbar-wrapper';

1.This is an example of how to use the component and some of the commonly used props that it supports:

 
   <Toolbar width={width} title="我的定制" navigator={this.props.navigator}
              actions={[
                         {icon:ACTION_ADD,value:'',show:OPTION_SHOW},
                           {value:'发布定制',show:OPTION_NEVER},
                         ]}
              onPress={(i)=>{
              console.log(i)
          }}
     >
     </Toolbar>

Readme

Keywords

Package Sidebar

Install

npm i react-native-toolbar-wrapper

Weekly Downloads

0

Version

1.1.5

License

ISC

Last publish

Collaborators

  • dandingol03