Files
shd.build/src/lib/components/ItemIcon.svelte
T
jb 4777a3abd5
Validate and deploy production / validate (push) Canceled after 0s
Validate and deploy production / deploy (push) Canceled after 0s
Validate and deploy staging / validate (push) Successful in 44s
Validate and deploy staging / deploy (push) Successful in 1m14s
feat: refine builder skill chip flows
2026-08-06 01:00:15 -04:00

18 lines
443 B
Svelte

<script lang="ts">
import { MISSING_ITEM_ICON_URL } from '$lib/item-icons';
let {
src = '',
alt = '',
className = ''
}: {
src?: string | null;
alt?: string;
className?: string;
} = $props();
const resolvedAlt = $derived(src || !alt ? alt : `${alt} — icon awaiting contribution`);
</script>
<img src={src || MISSING_ITEM_ICON_URL} alt={resolvedAlt} class:missing-item-icon={!src} class={`item-icon ${className}`.trim()}/>