diff --git a/src/lib/components/Picture.svelte b/src/lib/components/Picture.svelte new file mode 100644 index 0000000..7e90995 --- /dev/null +++ b/src/lib/components/Picture.svelte @@ -0,0 +1,33 @@ +{#if src} + + {#if src?.sources} + {#each Object.entries(src.sources) as [ format, srcset ]} + + {/each} + {/if} + + + +{/if} + + + + \ No newline at end of file diff --git a/src/lib/index.js b/src/lib/index.js index dc083eb..5f23709 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -1 +1,2 @@ -export { default as Image } from './components/Image.svelte' \ No newline at end of file +export { default as Image } from './components/Image.svelte' +export { default as Picture } from './components/Picture.svelte' \ No newline at end of file