Skip to content

Commit

Permalink
Updated tab bar animation
Browse files Browse the repository at this point in the history
  • Loading branch information
garraflavatra committed Dec 23, 2023
1 parent 421bde1 commit d90d5bc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/src/components/tabbar.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import { createEventDispatcher, onMount } from 'svelte';
import { tweened } from 'svelte/motion';
import { cubicInOut } from 'svelte/easing';
import { cubicOut } from 'svelte/easing';
import Icon from './icon.svelte';
export let tabs = [];
Expand All @@ -10,8 +10,8 @@
export let compact = true;
const dispatch = createEventDispatcher();
const activeIndicatorLeft = tweened(0, { easing: cubicInOut, duration: 400 });
const activeIndicatorRight = tweened(0, { easing: cubicInOut, duration: 400 });
const activeIndicatorLeft = tweened(0, { easing: cubicOut, duration: 400 });
const activeIndicatorRight = tweened(0, { easing: cubicOut, duration: 400 });
const liElements = {};
let navEl;
Expand All @@ -38,6 +38,8 @@
});
</script>

<svelte:window on:resize={() => moveActiveIndicator()} />

<nav class="tabs" class:compact bind:this={navEl}>
<ul>
{#each tabs as tab (tab.key)}
Expand Down

0 comments on commit d90d5bc

Please sign in to comment.