next-qrcode
next-qrcode copied to clipboard
Possible to provide options that are not relevant for the component type
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.
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.