0.0.1 • Published 5 years ago

@cipl/react-native-header-view v0.0.1

Weekly downloads
2
License
-
Repository
-
Last release
5 years ago

React Native Header

Customisable Header with consistent behaviour on iOS and Android.

Installation

Add the dependency

Pure React Native:

npm i @cipl/react-native-header-view

Peer Dependencies

Important! You need to install them

  • "react": ">= 16.x"
  • "react-native": ">= 0.61.x"

Usage

<HeaderComponent
  text="Header Title"
  backgroundColor="#fdfdfd"
  leftIconOnPress={() => NavigationService.back()}
  leftDisable = {false}
  rightDisable = {false}
  imageWidth = 20
  imageHeight = 20
/>

Header Props

PropertyTypeDefaultDescription
heightstring OR number70change the height of the header
widthstring OR number"100%"change the width of the header
backgroundColorstring#fffchange the background color of the header
stylesstylesstylesuse this to change main style of the header
textstringHeader Titleset the header's title
textStylestylestyleset your own style for the header's text
leftnumber16use this to set left icon's align
rightnumber16use this to set right icon's align
leftDisablebooleanfalsedisable the left icon component
rightDisablebooleanfalsedisablethe right icon component
leftIconOnPressfunctionfunctionset the function for left icon's onPress
rightIconOnPressfunctionfunctionset the function for right icon's onPress
inputStylestylesstylesuse this to change the text style
leftImageUrlstringbell-icon.pngpass left icon url for header
rightImageUrlstringmenu-icon.pngpass right icon url for header
imageWidthnumber20use this to set the icon width of header
imageHeightnumber20use this to set the icon height of header