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

add img (logo) and download api #72

Closed
wants to merge 4 commits into from

Conversation

pastleo
Copy link

@pastleo pastleo commented Feb 1, 2019

add `img` prop: { src, left, top, width, height }
add `genCanvas()`, `genCanvasDataURL()` and `download()` to provide
download feature
@pastleo
Copy link
Author

pastleo commented Feb 3, 2019

a demo here: https://static.pastleo.me/qrcode.react-example/

@llmonkey
Copy link

@zpao Hi! Just want to confirm is this PR will be merged?
Thanks.

@TimorCookie
Copy link

a demo here: https://static.pastleo.me/qrcode.react-example/

useful!

@pastleo
Copy link
Author

pastleo commented Mar 20, 2019

for people who found here: if you want to install my fork to your project, you can do so by:

npm i https://github.com/pastleo/qrcode.react/releases/download/0.9.2.2/qrcode.react.tar.gz
# or
yarn add https://github.com/pastleo/qrcode.react/releases/download/0.9.2.2/qrcode.react.tar.gz

usage and demo: https://static.pastleo.me/qrcode.react-example/

@Alevale
Copy link

Alevale commented Jun 9, 2019

This PR is really useful, will it be merged? @zpao I think given the feedback it received it would be a massive addition

@Angelk90
Copy link

@pastleo :

It would be possible to generate the qr codes with the following graphic:

Link: Site

@ashconnell
Copy link

This library is great but is it now unmaintained?

@zpao
Copy link
Owner

zpao commented Nov 9, 2019

I added support for embedding in #81 (and shipped in v1.0.0). I didn't add support for downloading yet as I don't think I want to do it the way you have here. In particular, I'm not convinced always rendering to canvas is best and I can see an argument for downloading the vector format if rendered as SVG. I'll leave this open to revisit. Thanks for doing this and inspiring me to actually get something supported!

@phlare
Copy link

phlare commented Apr 21, 2021

would love if this was merged in (or these features implemented in another way)

@meabed
Copy link

meabed commented Dec 15, 2021

This is super cool - @pastleo would you mind opening this pr here - i would love to help getting this feature: https://github.com/devmehq/react-qr-code

@pastleo pastleo closed this Dec 21, 2021
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 this pull request may close these issues.

9 participants