[wip] Add Image component
This commit is contained in:
23
src/components/atoms/Image.svelte
Normal file
23
src/components/atoms/Image.svelte
Normal 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>
|
||||
Reference in New Issue
Block a user