mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 20:09:35 +00:00
fix bug for default icon
This commit is contained in:
parent
b85ab30c99
commit
d5279ed94c
2 changed files with 20 additions and 4 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue