1.0.2 • Published 4 years ago

react-native-bm-header-action v1.0.2

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

Preview

Preview

React native module to add a button icon (with text or not)

Getting started

$ npm install react-native-bm-header-action --save

Mostly automatic installation

$ react-native link react-native-bm-header-action

How to use

Start by adding

import BmHeaderAction from 'react-native-bm-header-action';

then use like this :

<BmHeaderAction style={styles.headerStyle}
  title={this.props.title}
  buttonStyle={styles.buttonStyle}
  buttonIconStyle={styles.buttonIconStyle}
  titleStyle={styles.titleStyle}
  menuIcon={require("../icons/home.png")}
  buttonAction={this.onClick}/>

Properties

PropDefaultTypeDescriptionOptional
stylewidth: 100%style objectChange the default style of the base buttonyes
title-stringAdd a title in the headeryes
buttonStyle-style objectChange the default style of action buttonyes
buttonIconStyle-style objectChange the default style of the action iconyes
titleStyle-style objectChange the default style of the titleyes
menuIcon-icon likerequire('../myicon.png')or variable contain itAdd the icon to the buttonyes
buttonAction-functionAdd a callback function to the buttonyes

Enjoy :)