[wip] Add Image component

This commit is contained in:
2021-09-24 21:52:04 +02:00
parent bf70c133c8
commit 2211c74c99
2 changed files with 28 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
<script lang="ts">
export let id: string
export let alt: string
export let width: number
export let height: number
export let quality: number = 80
export let sizes: any = {}
// TODO:
// - quality
// - sizes
// -- width
// -- height
</script>
<picture class={$$props.class}>
<img
src="{import.meta.env.VITE_API_URL_DEV}/assets/{id}"
width={width}
height={height}
alt={alt}
/>
</picture>