Position Switcher for mobile and on Viewer

This commit is contained in:
2021-11-23 23:04:47 +01:00
parent dd66c34b6a
commit a9651b6b02
3 changed files with 82 additions and 18 deletions

View File

@@ -1,6 +1,8 @@
<script lang="ts">
import Icon from '$components/atoms/Icon.svelte'
export let isOver: boolean = false
let switcherEl: HTMLElement
let isOpen = false
@@ -48,7 +50,10 @@
<svelte:window on:click={windowClick} />
<aside class="switcher" class:is-open={isOpen} bind:this={switcherEl}>
<aside class="switcher" bind:this={switcherEl}
class:is-open={isOpen}
class:is-over={isOver}
>
<nav class="switcher__links">
<ul>
{#each links as { icon, iconLabel, url, text }}