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

Svelte is supporting? #180

Open
xarhang opened this issue Jun 30, 2023 · 2 comments
Open

Svelte is supporting? #180

xarhang opened this issue Jun 30, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@xarhang
Copy link

xarhang commented Jun 30, 2023

when i try in svelte it not work.... please anyone help me to use it on svelteJs

@binsarjr
Copy link

I have just converted https://github.com/kozakdenys/qr-code-styling to a Svelte action and added support for reactivity. check here https://www.npmjs.com/package/svelte-qrcode-action

@JeremyDarbellay
Copy link

JeremyDarbellay commented Oct 7, 2023

made it work with onMount and dynamic import !

let qrcc;
onMount(async () => {
  const module = await import('qr-code-styling')
  const QRCodeStyling = module.default
  const qrCode = new QRCodeStyling({ options });
  let blob = await qrCode.getRawData()
  qrcc = URL.createObjectURL(blob);
});

In your component : {#await qrcc then qrcc}<img src={qrcc} alt="your alt" />{/await}

@kozakdenys kozakdenys added the documentation Improvements or additions to documentation label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants