react-native-promptpay-qr
Version:
Simple QR code for Promptpay in React native
65 lines (50 loc) • 1.98 kB
Markdown
[![NPM version][npm-image]][npm-url]


[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]
[]: http://img.shields.io/npm/v/react-native-promptpay-qr.svg?style=flat-square
[]: http://npmjs.org/package/react-native-promptpay-qr
[]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[]: http://nodejs.org/download/
[]: https://img.shields.io/npm/dm/react-native-promptpay-qr.svg?style=flat-square
[]: https://npmjs.org/package/react-native-promptpay-qr
Simple QR code for Promptpay in React native
```bash
npm i react-native-promptpay-qr --save
```
```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 (
<View style={{flex: 1}}>
<PromptPayQR
payCode='081-xxx-xxxx'
amount={200}
/>
</View>
)}
}
AppRegistry.registerComponent('PromptPayQR', () => PromptPayQR)
```
---
| 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.