2.0.0 • Published 4 years ago

zalopay-react-native-ui-toolkit v2.0.0

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

ZaloPay React Native UI Toolkit

ZaloPay React Native components

Table of Contents

  1. Installation
  2. Components

Installation

  1. install zalopay-react-native-ui-toolkit and its dependeices
npm i zalopay-react-native-ui-toolkit --save

or

yarn add zalopay-react-native-ui-toolkit

Components

  1. ZPTransactionDetail
  2. TransactionProgressBar
  3. Banner

ZPTransactionDetail

ZPTransactionDetail

TransactionProgressBar

A React Native component use to display transaction progress

Usage

import { TransactionProgressBar } from 'zalopay-react-native-ui-toolkit';

const progressData = getIBFTProgressData(transactionStatus,transactionMessage);
return (
  <TransactionProgressBar
    progressData={progressData}
  />
)

Props

PropTypeDescriptionRequiredDefault
styleViewPropTypes.styleStyle of the View containing dataNo
progressData{currentStatus: {icon: Image,title: String,subTitle: String,index: Number},data: Array}Data to display transaction progressNo{}
minimizedboolMinimized transaction progressNofalse
onPressCurrentStatusfuncFunction when press on current status componentNo

Banner

A React Native component use to display Banner for information, warning, success, error.

Usage

import { Banner } from 'zalopay-react-native-ui-toolkit';

// Success banner
<Banner.Success />

// Information banner
<Banner.Information />

// Warning banner
<Banner.Warning />

// Error banner
<Banner.Error />

Props

PropTypeDescriptionRequiredDefault
styleViewPropTypes.styleNo
titleStringBanner titleNo''
descriptionStringBanner description, support HTMLNo''
onPressFuncA function to handle banner presses.No''
activeOpacityNumberDetermines what the opacity of the wrapped view should be when touch is active.No0.2