Add active class on Switcher current link
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
// Components
|
||||
import Icon from '$components/atoms/Icon.svelte'
|
||||
|
||||
export let isOver: boolean = false
|
||||
@@ -57,7 +59,7 @@
|
||||
<nav class="switcher__links">
|
||||
<ul>
|
||||
{#each links as { icon, iconLabel, url, text }}
|
||||
<li>
|
||||
<li class:is-active={$page.path === url}>
|
||||
<a href={url} on:click={toggleSwitcher}
|
||||
sveltekit:noscroll sveltekit:prefetch
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user