next-qrcode icon indicating copy to clipboard operation
next-qrcode copied to clipboard

Possible to provide options that are not relevant for the component type

Open ckelwin opened this issue 2 years ago • 1 comments

The QR code can be rendered in three different types, i.e. Canvas, SVG and Image. All three types have different available options prop parameters (as shown in the readme/documentation). However, they are all linked to the QRCodeOptions type in code which contains all props.

Issues:

  • It is possible to provide non relevant props when generating a qr.
  • Will need to check documentation which props are relevant for a given type.

ckelwin avatar Sep 29 '23 10:09 ckelwin

I've created a PR for this. It does introduce a possible breaking change, i.e. when a prop was used for a type that does not have it.

Happy to discuss how else we can better handle this.

ckelwin avatar Sep 29 '23 11:09 ckelwin