mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36: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 */
|
/** Obtain a reference to the HTML anchor element */
|
||||||
export let ref = null;
|
export let ref = null;
|
||||||
|
|
||||||
import { Icon } from "../../Icon";
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<li class:bx--side-nav__item="{true}">
|
<li class:bx--side-nav__item="{true}">
|
||||||
|
@ -39,10 +37,9 @@
|
||||||
>
|
>
|
||||||
{#if icon}
|
{#if icon}
|
||||||
<div
|
<div
|
||||||
class:bx--side-nav__icon="{true}"
|
class:bx--side-nav__icon="{true}"
|
||||||
class:bx--side-nav__icon--small="{true}"
|
class:bx--side-nav__icon--small="{true}">
|
||||||
>
|
<svelte:component this="{icon}" />
|
||||||
<Icon {...icon} />
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<span class:bx--side-nav__link-text="{true}">{text}</span>
|
<span class:bx--side-nav__link-text="{true}">{text}</span>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue