Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing viewBox type in props #248

Open
WhereCanI opened this issue Oct 20, 2023 · 1 comment
Open

Missing viewBox type in props #248

WhereCanI opened this issue Oct 20, 2023 · 1 comment

Comments

@WhereCanI
Copy link

It is not possible to add viewBox as a property to React QR when you use TypeScript.

The error it gives is:

  Overload 1 of 2, '(props: QRCodeProps | Readonly<QRCodeProps>): QRCode', gave the following error.
    Type '{ value: string; size: number; viewBox: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<QRCode> & Readonly<QRCodeProps>'.
      Property 'viewBox' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<QRCode> & Readonly<QRCodeProps>'.
  Overload 2 of 2, '(props: QRCodeProps, context: any): QRCode', gave the following error.
    Type '{ value: string; size: number; viewBox: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<QRCode> & Readonly<QRCodeProps>'.
      Property 'viewBox' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<QRCode> & Readonly<QRCodeProps>'.```
@WhereCanI
Copy link
Author

For now it can be fixed by adding //@ts-ignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant