mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
Update SideNavLink.svelte
The Icon throws as SSR error when used. This uses the same code as the HeaderGlobalAction which works with no errors
This commit is contained in:
parent
443f957027
commit
0789e3aea3
1 changed files with 3 additions and 6 deletions
|
@ -22,8 +22,6 @@
|
|||
|
||||
/** Obtain a reference to the HTML anchor element */
|
||||
export let ref = null;
|
||||
|
||||
import { Icon } from "../../Icon";
|
||||
</script>
|
||||
|
||||
<li class:bx--side-nav__item="{true}">
|
||||
|
@ -40,9 +38,8 @@
|
|||
{#if icon}
|
||||
<div
|
||||
class:bx--side-nav__icon="{true}"
|
||||
class:bx--side-nav__icon--small="{true}"
|
||||
>
|
||||
<Icon {...icon} />
|
||||
class:bx--side-nav__icon--small="{true}">
|
||||
<svelte:component this="{icon}" />
|
||||
</div>
|
||||
{/if}
|
||||
<span class:bx--side-nav__link-text="{true}">{text}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue