react-native-promptpay-qr
[![NPM version][npm-image]][npm-url]
!
react-native
!
react
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]
[npm-image]: http://img.shields.io/npm/v/react-native-promptpay-qr.svg?style=flat-square
[npm-url]: http://npmjs.org/package/react-native-promptpay-qr
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/react-native-promptpay-qr.svg?style=flat-square
[download-url]: https://npmjs.org/package/react-native-promptpay-qr
Simple QR code for Promptpay in React native
Getting Started
$3
``
bash
npm i react-native-promptpay-qr --save
`
$3
`
JavaScript
import React, { Component } from 'react'
import { AppRegistry, View } from 'react-native'
import PromptPayQR from 'react-native-promptpay-qr'
class QRcode extends Component {
render() {
return (
payCode='081-xxx-xxxx'
amount={200}
/>
)}
}
AppRegistry.registerComponent('PromptPayQR', () => PromptPayQR)
``
$3
---
| Props | Type | Default | Description |
|:------|:-----|:--------|:-----------|
| payCode | string | - | ID card number or Phone number ( 081-xxx-xxxx or 1-xxxx-xxxxx-xx-x ) |
| amount | number | 0 | quantity of pay |
| size | number | 128 | size of qr code |
| bgColor | string | '#000' | background of qr code |
| fgColor | string | '#FFF' | foreground of qr code |
References
- https://github.com/dtinth/promptpay-qr
- https://github.com/cssivision/react-native-qrcode
License
react-native-promptpay-qr is released under the MIT license.