Skip to content

Commit 37043fc

Browse files
Wenderson Piresrishichawda
authored andcommitted
Typescript types were included
1 parent f199e9d commit 37043fc

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

index.d.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from 'react';
2+
3+
interface QRCodeProps {
4+
/**
5+
* Value of the QRCode
6+
*/
7+
value: string;
8+
/**
9+
* Size of the qrcode / image.
10+
*/
11+
size: number;
12+
/**
13+
* Background Color for the qrcode / image.
14+
*/
15+
bgColor: string;
16+
/**
17+
* Foreground Color for the qrcode / image.
18+
*/
19+
fgColor: string;
20+
onLoad?: () => void;
21+
onLoadEnd?: () => void;
22+
/**
23+
* Returns the base64 png image data
24+
*/
25+
getImageOnLoad?: () => string;
26+
}
27+
28+
declare class QRCode extends React.Component<QRCodeProps, any> {}
29+
30+
export default QRCode;

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
"peerDependencies": {
2626
"react-native-webview": "^9.0.1"
2727
}
28-
}
28+
}

0 commit comments

Comments
 (0)