svelte-qrcode-image
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "svelte-qrcode-image", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"devDependencies": { | ||
@@ -20,3 +20,3 @@ "@sveltejs/adapter-auto": "next", | ||
}, | ||
"homepage": "https://svelte-qrcode-image.vercel.app/", | ||
"homepage": "https://svelte-qrcode-image.itoldyou.dev/", | ||
"repository": { | ||
@@ -23,0 +23,0 @@ "type": "git", |
@@ -8,5 +8,5 @@ import { SvelteComponentTyped } from "svelte"; | ||
displayStyle?: string | undefined; | ||
imgAlt?: string | undefined; | ||
margin: number | undefined; | ||
scale: number | undefined; | ||
altText?: string | undefined; | ||
margin?: number | undefined; | ||
scale?: number | undefined; | ||
width: number | undefined; | ||
@@ -13,0 +13,0 @@ getImageURL?: (() => string) | undefined; |
@@ -6,2 +6,4 @@ # Svelte-QRCode-Image | ||
and display via `<img>` element, with TypeScript support, works on SvelteKit. | ||
<br> | ||
Visit [this page](https://svelte-qrcode-image.itoldyou.dev/) for live demo. | ||
@@ -25,5 +27,22 @@ | ||
## Parameters | ||
These parameters can be pass in to the `<QRCodeImage />` | ||
Although none of them are required, but please fill in the `text` | ||
| prop | type | description | default value | | ||
|---------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------| | ||
| text | string | what you want the QR Code to show; the QR Code will changed automatically if any changes in the variable binding to it | "Hello World" | | ||
| displayWidth | number | pass to the `width` property of `<img>` tag | null - the final `<img>` element will not have this property | | ||
| displayHeight | number | pass to the `height` property of `<img>` tag | null - the final `<img>` element will not have this property | | ||
| displayStyle | string | pass to the `style` property of `<img>` tag | "" - the final `<img>` element will not have this property | | ||
| displayStyle | string | pass to the `style` property of `<img>` tag | "" - the final `<img>` element will not have this property | | ||
| altText | string | pass to the `alt` property of `<img>` tag | "QR Code" | | ||
| margin | number | pass to `margin` to the options of [qrcode](https://www.npmjs.com/package/qrcode): Define how much wide the quiet zone should be | 4 | | ||
| scale | number | pass to `scale` to the options of [qrcode](https://www.npmjs.com/package/qrcode): A value of `1` means 1px per modules (black dots) | 4 | | ||
| width | number | pass to `width` to the options of [qrcode](https://www.npmjs.com/package/qrcode): Forces a specific width for the output image and takes precedence over `scale`. | undefined | | ||
## TODO | ||
- [ ] Documentation | ||
- [x] Documentation | ||
- [ ] Expose more options | ||
@@ -30,0 +49,0 @@ - [x] Expose options to control the `<img>` tag |
Sorry, the diff of this file is not supported yet
8074
96