Add: CardIcon support PNG
This commit is contained in:
parent
ea3e3e0530
commit
f1e3fb3199
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user