UNPKG

react-qrcode

Version:

🤳 A React component for QR code generation with `qrcode`

19 lines (18 loc) • 910 B
import { QRCodeSegment as _QRCodeSegment, QRCodeToDataURLOptions } from 'qrcode'; export declare const LEVELS: readonly ["low", "medium", "quartile", "high", "L", "M", "Q", "H"]; export declare const MASK_PATTERNS: readonly [0, 1, 2, 3, 4, 5, 6, 7]; export declare type MaskPattern = typeof MASK_PATTERNS[number]; export declare const MODES: readonly ["auto", "alphanumeric", "numeric", "kanji", "byte"]; export declare const TYPES: readonly ["image/png", "image/jpeg", "image/webp"]; export declare type QRCodeMode = typeof MODES[number]; export declare type _QRCodeValue = _QRCodeSegment[] | string; export interface QRCodeSegment { data: string; mode?: QRCodeMode | null; } export declare type QRCodeValue = QRCodeSegment[] | string; export declare type QRCodeOptions = Omit<QRCodeToDataURLOptions, 'rendererOpts'> & { maskPattern?: MaskPattern; quality?: number; value: QRCodeValue; };