Skip to content

Commit 81e42fd

Browse files
authored
chore: update readme.md and publish package (#6)
1 parent eca3138 commit 81e42fd

File tree

4 files changed

+30
-19
lines changed

4 files changed

+30
-19
lines changed

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
44
A react-native component to generate [QRcode](http://en.wikipedia.org/wiki/QR_code).
55

66
## Installation
7+
78
```sh
8-
npm install react-native-qrcode --save
9+
npm install react-native-qrcode-generator --save
910
```
11+
12+
*(**Note** : If you want to use the original unmaintained package, [visit this link](https://github.com/cssivision/react-native-qrcode)).*
13+
1014
## Usage
1115
```jsx
1216
'use strict';
1317

1418
import React, { Component } from 'react'
15-
import QRCode from 'react-native-qrcode';
19+
import QRCode from 'react-native-qrcode-generator';
1620

1721
import {
1822
AppRegistry,
@@ -37,7 +41,7 @@ class HelloWorld extends Component {
3741
<QRCode
3842
value={this.state.text}
3943
size={200}
40-
bgColor='purple'
44+
bgColor='black'
4145
fgColor='white'/>
4246
</View>
4347
);
@@ -66,17 +70,24 @@ AppRegistry.registerComponent('HelloWorld', () => HelloWorld);
6670

6771
module.exports = HelloWorld;
6872
```
73+
74+
#### Output :
75+
76+
<img src='qrcode.png' height = '256' width = '256'/>
77+
78+
##
79+
6980
## Available Props
7081

71-
prop | type | default value
82+
prop | type | Description
7283
----------|----------------------|--------------
73-
`value` | `string` | `http://facebook.github.io/react-native/`
74-
`size` | `number` | `128`
75-
`bgColor` | `string` (CSS color) | `"#000"`
76-
`fgColor` | `string` (CSS color) | `"#FFF"`
84+
`value` | `string` ( **Default** : `http://facebook.github.io/react-native/` ) | Value of the QRCode.
85+
`size` | `number` ( **Default** : `128` ) | Size of the qrcode / image.
86+
`bgColor` | `string` ( **Default** : `white` ) | Background Color for the qrcode / image.
87+
`fgColor` | `string` ( **Default** : `black` ) | Foreground Color for the qrcode / image.
88+
`getImageOnLoad` | `function` | Returns the base64 png image data *( string )*.
7789

78-
<img src='qrcode.png' height = '256' width = '256'/>
7990

80-
# Licenses
91+
## Licenses
8192

82-
All source code is licensed under the [MIT License](https://github.com/cssivision/react-native-qrcode/blob/master/LICENSE).
93+
All source code is licensed under the [MIT License](https://github.com/rishichawda/react-native-qrcode/blob/master/LICENSE).

lib/QRCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var QRCode = createReactClass({
6565

6666
getDefaultProps: function() {
6767
return {
68-
value: 'https://github.com/rishichawda/react-native-qrcode',
68+
value: 'https://github.com/rishichawda/react-native-qrcode-generator',
6969
fgColor: 'white',
7070
bgColor: 'black',
7171
size: 128,

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"name": "react-native-qrcode",
3-
"version": "0.2.7",
2+
"name": "react-native-qrcode-generator",
3+
"version": "1.0.0",
44
"description": "react-native qrocode generator",
55
"main": "index.js",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/cssivision/react-native-qrcode.git"
8+
"url": "https://github.com/rishichawda/react-native-qrcode-generator.git"
99
},
1010
"keywords": [
1111
"react-native",
12-
"qrcode"
12+
"qrcode",
13+
"generator"
1314
],
14-
"author": "sivision.chen <[email protected]>",
1515
"license": "MIT",
1616
"bugs": {
17-
"url": "https://github.com/cssivision/react-native-qrcode/issues"
17+
"url": "https://github.com/rishichawda/react-native-qrcode-generator/issues"
1818
},
19-
"homepage": "https://github.com/cssivision/react-native-qrcode#readme",
19+
"homepage": "https://github.com/rishichawda/react-native-qrcode-generator#readme",
2020
"dependencies": {
2121
"create-react-class": "^15.6.0",
2222
"prop-types": "^15.5.10",

qrcode.png

-17.7 KB
Loading

0 commit comments

Comments
 (0)