Add: CardIcon support PNG
This commit is contained in:
parent
ea3e3e0530
commit
f1e3fb3199
@ -17,6 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
export let iconName;
|
export let iconName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {string | undefined}
|
||||||
|
*/
|
||||||
|
export let iconSrc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
@ -36,7 +41,12 @@
|
|||||||
|
|
||||||
<Card horizontal={true} background={colorBackground}>
|
<Card horizontal={true} background={colorBackground}>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
|
{#if iconSrc}
|
||||||
|
<img src={iconSrc} alt={iconName} height={iconSize} width={iconSize}>
|
||||||
|
{:else}
|
||||||
<Tablericon color={colorIcon} name={iconName} size={iconSize}></Tablericon>
|
<Tablericon color={colorIcon} name={iconName} size={iconSize}></Tablericon>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user