You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,24 @@ render() {
69
69
70
70
```
71
71
72
+
```
73
+
// get base64 string encode of the qrcode (currently logo is not included)
74
+
getDataURL() {
75
+
this.svg.toDataURL(this.callback);
76
+
}
77
+
callback(dataURL) {
78
+
console.log(dataURL);
79
+
}
80
+
render() {
81
+
return (
82
+
<QRCode
83
+
value="Just some string value"
84
+
getRef={(c) => (this.svg = c)}
85
+
/>
86
+
);
87
+
}
88
+
```
89
+
72
90
73
91
### Props
74
92
@@ -80,6 +98,7 @@ color | 'black' | Color of the QR code
80
98
logo | null | Image source object. Ex. {uri: 'base64string'} or {require('pathToImage')}
81
99
logoSize | 20% of size | Size of the imprinted logo. Bigger logo = less error correction in QR code
82
100
logoBackgroundColor | backgroundColor | The logo gets a filled quadratic background with this color. Use 'transparent' if your logo already has its own backdrop.
0 commit comments