Files
flotilla/src/lib/components/Icon.svelte
T
2026-02-19 12:26:18 -08:00

26 lines
455 B
Svelte

<style>
div {
mask-repeat: no-repeat;
mask-size: 100% 100%;
}
</style>
<script lang="ts">
const {
icon,
size = 5,
...restProps
}: {
icon: string
size?: number
class?: string
} = $props()
const px = size * 4
</script>
<div
class="inline-block {restProps.class}"
style="mask-image: url({icon}); width: {px}px; height: {px}px; min-width: {px}px; min-height: {px}px; background-color: currentcolor;">
</div>