rosskhanas/react-qr-code

QRCodeProps type doesn't have `viewBox`

SunYoungKwon opened this issue · 0 comments

Hello! Thank you for making this nice library👍

I tried to use responsive QR Code on Web like the example in README. but I cannot add viewBox prop to <QRCode />.

image

QRCode component doesn't have viewBox in the QRCodeProps type.
I thinkReact.HTMLProps<SVGElement> should be changed to React.SVGProps<SVGElement>

-   export interface QRCodeProps extends React.HTMLProps<SVGElement> {
+  export interface QRCodeProps extends React.SVGProps<SVGElement> {
    value: string;
    size?: number; // defaults to 128
    bgColor?: string; // defaults to '#FFFFFF'
    fgColor?: string; // defaults to '#000000'
    level?: 'L' | 'M' | 'Q' | 'H'; // defaults to 'L'
  }