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

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

Open
ckelwin opened this issue Sep 29, 2023 · 1 comment · May be fixed by #41
Open

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

ckelwin opened this issue Sep 29, 2023 · 1 comment · May be fixed by #41

Comments

@ckelwin
Copy link

ckelwin commented Sep 29, 2023

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 added a commit to ckelwin/next-qrcode that referenced this issue Sep 29, 2023
…rface for each of the qr types, i.e. Canvas, SVG and Image. Added inline comment for better developer experience.
@ckelwin
Copy link
Author

ckelwin commented Sep 29, 2023

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.

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

Successfully merging a pull request may close this issue.

1 participant