Add: CardIcon support PNG

This commit is contained in:
Donatas Kirda 2024-05-20 23:32:01 +03:00
parent ea3e3e0530
commit f1e3fb3199
Signed by: bloodwiing
GPG Key ID: 63020D8D3F4A164F

View File

@ -17,6 +17,11 @@
*/
export let iconName;
/**
* @type {string | undefined}
*/
export let iconSrc;
/**
* @type {number}
*/
@ -36,7 +41,12 @@
<Card horizontal={true} background={colorBackground}>
<div class="icon">
{#if iconSrc}
<img src={iconSrc} alt={iconName} height={iconSize} width={iconSize}>
{:else}
<Tablericon color={colorIcon} name={iconName} size={iconSize}></Tablericon>
{/if}
</div>
<slot />
</Card>