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:
David Sedman 2020-12-16 11:33:19 +00:00 committed by GitHub
commit 0789e3aea3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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>