<script lang="ts">
	interface Props {
		name: string;
		label?: string;
		size?: number;
	}

	let { name, label, size = 20 }: Props = $props();
</script>

<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} aria-hidden={!label}>
	<use href={`/icons.svg#${name}`}></use>
	{#if label}<title>{label}</title>{/if}
</svg>
