Files
flotilla/src/lib/components/ImageIcon.svelte
T
2025-10-31 16:19:22 -07:00

17 lines
325 B
Svelte

<script lang="ts">
import Icon from "@lib/components/Icon.svelte"
type Props = {
src: string
alt: string
}
const {src, alt}: Props = $props()
</script>
{#if src.includes("image/svg") || src.endsWith(".svg")}
<Icon icon={src} />
{:else}
<img {src} {alt} class="h-5 w-5 rounded-lg object-cover" />
{/if}