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

Some necessary Types are missing from QrCodeAttributes #6

Open
Madame-Aehm opened this issue Jan 1, 2024 · 1 comment
Open

Some necessary Types are missing from QrCodeAttributes #6

Madame-Aehm opened this issue Jan 1, 2024 · 1 comment

Comments

@Madame-Aehm
Copy link

When using the qr-code element with Typescript in React, I'm getting the error Property 'children' does not exist on type 'QrCodeAttributes'.ts(2322). The child is the img element I've put as an icon.

I also get this error for 'style' and 'className', at least one of which is needed to style it!

If I manually add these properties to the QrCodeAttributes Interface in the Node Modules, it builds without problem, but this only works for development. I've currently just ignored the TS errors to get it to build.

@kevinfosterNG
Copy link

+1. I did want to call out that switching from TSX to JSX only for whatever component you're sticking the QR code in does resolve the issue.

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

2 participants