1.1.0 • Published 3 years ago

react-native-header-baochau9xx v1.1.0

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

Information

Create by NGUYEN PHUC BAO CHAU

Date: 19/03/2021

Requirements

Install vector-icons

npm install react-native-vector-icons

Link vector-icons to your project

npx react-native link

Installation

npm install react-native-header-baochau9xx

Usage

import React from 'react';
import { View, Text } from 'react-native';
import {Header, Sizes} from 'react-native-header-baochau9xx';

export default class Home extends React.Component {
  render() {
    return (
      <View style={{ flex: 1 }}>
        <Header
          title={'This is header'}
          iconLeft={'chevron-back'}  // Ionicons (vector-icons)
          iconRight={'plus'}  // Octicons (vector-icons)
          colorTitle={'red'}
          colorIcon={'green'}
          colorBackground={'yellow'}
          headerSize={Sizes.h100}
          onPressLeft={() => console.log('Click left')}
          onPressRight={() => console.log('Click Right')}
        />
        <View style={{ flex: 1, alignItems: 'center' }}>
          <View style={{ flex: 1, flexDirection: 'row', alignItems: 'center' }}>
            <Text style={{ fontSize: 18 }}>Running..</Text>
          </View>
        </View>
      </View>
    );
  }
}

Available props

NameTypeDefaultDescription
colorBackgroundcolor'#fff'Color background of header
colorTitlecolor'#555555'Color of title (text center)
colorIconcolor'#d4d5d8'Color of icon left and right
titlestringThis is titleTitle of header (screen name)
headerSizenumberScale 100Size (height) of header
iconLeftIoniconsIcon in left of header (Ionicons)
iconRightOcticonsIcon in right of header (Octicons)
onPressLeftfunctionWhen click left icon
onPressRightfunctionWhen click right icon

About me

Facebook: My Facebook

Linkedin: My Linkedin

1.1.0

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago