0.1.0 • Published 3 years ago

react-native-elegant-header v0.1.0

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

Battle Tested ✅

React Native Elegant Header

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

Installation

Add the dependency:

npm i react-native-elegant-header

Peer Dependencies

Usage

Import

import ElegantHeader from "react-native-elegant-header";

Fundamental Usage

<ElegantHeader
  title="Welcome"
  description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tristique fermentum magna, porttitor vulputate arcu dapibus et."
/>

Basic Usage with Back Button

<ElegantHeader
  title="Welcome"
  description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tristique fermentum magna, porttitor vulputate arcu dapibus et."
  enableBackButton
  onPress={() => {}}
/>

Example Project 😍

You can checkout the example project 🥰

Simply run

  • npm i
  • react-native run-ios/android

should work of the example project.

Configuration - Props

Fundamentals

PropertyTypeDefaultDescription
titlestringundefinedchange the title
descriptionstringundefinedchange the descrition

Customization (Optionals)

PropertyTypeDefaultDescription
enableBackButtonbooleanfalselet you enable the back button (must use it for button)
onPressfunctionundefinedset your own logic for the back button functionality when it is pressed
TextComponentTextdefaultset your own component instead of default react-native Text component
TouchableComponentImagedefaultset your own component instead of default react-native Image component
styleViewStyledefaultset or override the style object for the main container
backButtonImageStyleViewStyledefaultset or override the style object for the back button's image style
titleTextStyleTextStyledefaultset or override the style object for the title's text style
descriptionTextStyleTextStyledefaultset or override the style object for the description's text style
descriptionContainerStyleViewStyledefaultset or override the style object for the description's container style

Future Plans

  • LICENSE
  • Write an article about the lib on Medium

Change Log

Change log will be here !

Author

FreakyCoder, kurayogun@gmail.com

License

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