1.0.2 • Published 5 years ago

@hamzav/react-native-headerbar v1.0.2

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

React Native Header Bar

Header bar with a hamburger menu for react-native apps.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

What things you need to install the software:

Download and Install: Node

Once Node is installed, run

npm install react-native

Have an up and running react-native project. See https://facebook.github.io/react-native/docs/getting-started for more information.

Installing

To install component, navigate to project root directory and run

npm install react-native-simple-headerbar

Documentation

Props

NameTypeRequiredDefaultDescription
hideHamburgerMenuPropTypes.booleanNoBoolean to hide hamburger menu.
onMenuPressPropTypes.funcNoFunction to handle on hambruger menu press.
hamburgerMenuColorPropTypes.stringNoString to hold hamburger menu color.
textPropTypes.stringNoTitle for the header.
textStylePropTypes.objectNoCSS object to style text.
showBackButtonPropTypes.booleanNoBoolean to control if back button should be shown. (hideHamburgerMenu takes precedence)
onBackButtonPressPropTypes.funcNoFunction to handle on back button press.
stylePropTypes.objectNoCSS object to style bar.

Usage

Within react-native js file

import Header from 'react-native-headerbar';

<Header
    hideHamburgerMenu={false}
    hamburgerMenuColor="white"
    onMenuPress={...}
    text="Example"
    textStyle={...}
/>

Built With

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Hamza Varvani - Initial work - HamzaKV

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments