mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 04:57:59 +00:00
Updated tab bar animation
This commit is contained in:
parent
421bde13f5
commit
d90d5bcf63
@ -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 = [];
|
||||
@ -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;
|
||||
|
||||
@ -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)}
|
||||
|
Loading…
Reference in New Issue
Block a user