Bunlong / next-qrcode

React hooks for generating QRCode for your next React apps.
https://next-qrcode.js.org
MIT License
159 stars 18 forks source link

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

Open ckelwin opened 1 year ago

ckelwin commented 1 year ago

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:

ckelwin commented 1 year ago

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.