1.0.2 • Published 3 years ago

react-native-modern-header v1.0.2

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

Battle Tested ✅

React Native Modern Header

npm version npm Platform - Android and iOS License: MIT styled with prettier

Installation

Add the dependency:

npm i react-native-modern-header

Peer Dependencies

Zero Dependency

Version Warning!

Version 1.0.0 is re-written from stratch, if you want to use lower than 1.0.0, please check the lower version commits to reach the documentation.

Usage

Import

import ModernHeader from "react-native-modern-header";

Fundamental Usage

<ModernHeader title="Header" />

Configuration - Props

Modern Header Props

PropertyTypeDefaultDescription
titlestringundefinedset the title of the header
styleViewStyledefaultchange/override the main style
leftComponentDisablebooleanfalseset to true for disabling the left component
rightComponentDisablebooleanfalseset to true for disabling the right component
onLeftPressfunctionundefineduse this to set your own logic when the left component is pressed
onRightPressfunctionundefineduse this to set your own logic when the right component is pressed
leftComponentStyleViewStyledefaultchange/override the left component's main style
rightComponentStyleViewStyledefaultchange/override the right component's main style
TextComponentanyTextset your own custom Text component instead of React Native Text
titleTextStyleTextStyledefaultchange/override the title's text style
TouchableComponentanyTouchableOpacityset your own custom Touchable component instead of React Native TouchableOpacity
leftImageSourcesourcedefaultchange the left icon image
rightImageSourcesourcedefaultchange the right icon image
leftCustomComponentanydefaultset your own custom component instead of default left image component
rightCustomComponentanydefaultset your own custom component instead of default right image component

Future Plans

  • LICENSE
  • Version 1.0.0

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Modern Header is available under the MIT license. See the LICENSE file for more info.