fix: fix transition logic for svelte 4 (#220)

update transition logic for svelte 4
This commit is contained in:
Kendell R
2024-01-11 06:56:16 -08:00
committed by GitHub
parent 66bb4b10f8
commit c90201f5f0
8 changed files with 12 additions and 18 deletions

View File

@@ -27,7 +27,7 @@
alt="Clear"
on:click={clear}
on:keypress={clear}
transition:fade|local={{ easing: quintOut, duration: 250 }}
transition:fade={{ easing: quintOut, duration: 250 }}
/>
{/if}
<input

View File

@@ -3,7 +3,6 @@
import { expoOut } from 'svelte/easing';
export let open = false;
export let closeIcon = false;
export let dismissTime = 3000;
let timeout: ReturnType<typeof setTimeout>;
@@ -16,9 +15,8 @@
{#if open}
<div
class="snackbar"
class:closeIcon
in:slide|local={{ duration: 400, easing: expoOut }}
out:fade|local={{ duration: 300, easing: expoOut }}
in:slide={{ duration: 400, easing: expoOut }}
out:fade={{ duration: 300, easing: expoOut }}
>
<div class="text">
<slot name="text" />

View File

@@ -1,8 +1,4 @@
<script>
import { fade } from 'svelte/transition';
</script>
<div class="spinner" transition:fade={{ duration: 250 }} />
<div class="spinner" />
<style>
@keyframes spinner {