fix bug for default icon

This commit is contained in:
Daniel Miedzik 2021-10-14 10:40:47 +02:00
commit d5279ed94c
2 changed files with 20 additions and 4 deletions

View file

@ -10,7 +10,7 @@
* Specify the icon from `carbon-icons-svelte` to render
* @type {typeof import("carbon-icons-svelte").CarbonIcon}
*/
export let icon = undefined;
export let icon = AppSwitcher20;
/**
* Specify the text
@ -63,7 +63,7 @@
dispatch(isOpen ? 'open' : 'close');
}}"
>
<Icon render="{icon || (isOpen ? Close20 : AppSwitcher20)}" />
<Icon render="{icon}" />
<slot name="text">
{#if text}<span>{text}</span>{/if}
</slot>