@lglab/react-qr-code 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.d.ts +14 -5
- package/dist/index.es.js +578 -520
- package/package.json +5 -5
package/README.md
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,14 @@ export declare interface DataModulesSettings {
|
|
|
14
14
|
*/
|
|
15
15
|
export declare type DataModulesStyle = 'square' | 'square-sm' | 'rounded' | 'leaf' | 'vertical-line' | 'horizontal-line' | 'circle' | 'diamond' | 'star' | 'heart';
|
|
16
16
|
|
|
17
|
+
export declare type DownloadFileFormat = 'svg' | 'png' | 'jpeg';
|
|
18
|
+
|
|
19
|
+
export declare interface DownloadOptions {
|
|
20
|
+
name?: string;
|
|
21
|
+
format?: DownloadFileFormat;
|
|
22
|
+
size?: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
export declare type ERROR_LEVEL_MAPPED_TYPE = {
|
|
18
26
|
[index in ErrorCorrectionLevel]: qrcodegen.QrCode.Ecc;
|
|
19
27
|
};
|
|
@@ -202,7 +210,7 @@ export declare const ReactQRCode: {
|
|
|
202
210
|
};
|
|
203
211
|
|
|
204
212
|
export declare interface ReactQRCodeProps {
|
|
205
|
-
ref?: Ref<
|
|
213
|
+
ref?: Ref<ReactQRCodeRef>;
|
|
206
214
|
/**
|
|
207
215
|
* The value to encode into the QR Code. An array of strings can be passed in
|
|
208
216
|
* to represent multiple segments to further optimize the QR Code.
|
|
@@ -226,10 +234,6 @@ export declare interface ReactQRCodeProps {
|
|
|
226
234
|
* @defaultValue 0
|
|
227
235
|
*/
|
|
228
236
|
marginSize?: number;
|
|
229
|
-
/**
|
|
230
|
-
* The title to assign to the QR Code. Used for accessibility reasons.
|
|
231
|
-
*/
|
|
232
|
-
title?: string;
|
|
233
237
|
/**
|
|
234
238
|
* The minimum version used when encoding the QR Code. Valid values are 1-40
|
|
235
239
|
* with higher values resulting in more complex QR Codes. The optimal
|
|
@@ -273,4 +277,9 @@ export declare interface ReactQRCodeProps {
|
|
|
273
277
|
svgProps?: React.SVGProps<SVGSVGElement>;
|
|
274
278
|
}
|
|
275
279
|
|
|
280
|
+
export declare interface ReactQRCodeRef {
|
|
281
|
+
svg: SVGSVGElement | null;
|
|
282
|
+
download: (options: DownloadOptions) => void;
|
|
283
|
+
}
|
|
284
|
+
|
|
276
285
|
export { }
|