lazy-svelte-image 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  <script>import { onMount } from "svelte";
2
2
  export let src;
3
+ export let alt = "";
3
4
  export let backgroundColor = "#c2c2c224";
4
5
  export let disabeLoader = false;
5
6
  export let disableBroken = false;
@@ -26,7 +27,7 @@ onMount(() => {
26
27
  </script>
27
28
 
28
29
  {#if loaded}
29
- <img {...$$restProps} {src} alt="" />
30
+ <img {...$$restProps} {src} {alt} />
30
31
  {:else if failed}
31
32
  <div class="image-placeholder" style="--background-color: {backgroundColor}">
32
33
  {#if !disableBroken}
@@ -3,6 +3,7 @@ declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
5
  src: string;
6
+ alt?: string;
6
7
  backgroundColor?: string;
7
8
  disabeLoader?: boolean;
8
9
  disableBroken?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lazy-svelte-image",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "svelte",