27 lines
483 B
Svelte
27 lines
483 B
Svelte
<script lang="ts">
|
|
import { logoById } from '$lib/duck/logos';
|
|
|
|
let {
|
|
id,
|
|
size = 24,
|
|
x = undefined,
|
|
y = undefined,
|
|
color = 'currentColor'
|
|
}: { id: string; size?: number; x?: number; y?: number; color?: string } = $props();
|
|
|
|
const def = $derived(logoById(id));
|
|
</script>
|
|
|
|
{#if def}
|
|
<svg
|
|
viewBox="0 0 24 24"
|
|
width={size}
|
|
height={size}
|
|
x={x}
|
|
y={y}
|
|
style:color={def.mono ? color : undefined}
|
|
role="img"
|
|
aria-label={def.label}
|
|
>{@html def.svg}</svg>
|
|
{/if}
|