qr-code icon indicating copy to clipboard operation
qr-code copied to clipboard

Some necessary Types are missing from QrCodeAttributes

Open Madame-Aehm opened this issue 1 year ago • 1 comments

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.

Madame-Aehm avatar Jan 01 '24 13:01 Madame-Aehm

+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.

kevinfosterNG avatar Jun 10 '24 13:06 kevinfosterNG