bitjson/qr-code

Allow to change "roundness" of QR code parts individually

stefan-schweiger opened this issue · 2 comments

Hi, first of great work, I looked through the source code and I think this project is really nicely done!

I was wondering if you might be open to extend the functionality of this package a bit to allow additional configurations. For I already have done the changes locally, just wondering if you are interested in such a thing.

My proposal looks like this:

<qr-code
  contents="bitcoincash:?r=https://bitjson.com/example-url"
  module-color="#1c7d43"
  position-ring-color="#13532d"
  position-center-color="#70C559"
  module-roundness="1"
  position-ring-roundness="1"
  position-center-roundness="1"
>
  <img src="assets/bch.svg" slot="icon" />
</qr-code>
image

All roundness settings set to 0.5:

image

All roundness settings set to 0:

image

I would also want to expose the errorCorrectionLevel and typeNumber. My last proposal is that maybe squares is not the best naming anymore with those changes and maybe it should be called raw?

Let me know if you have any interest in those changes then I will create a PR!

Hey @stefan-schweiger, I'd be happy to accept a PR! Changes will need to maintain backwards-compatibility, but exposing additional attributes would be fine.

(Related: I'd also love to take a PR upgrading to the latest version of Stencil, since the version in use is so outdated.)