diff options
| author | Fuwn <[email protected]> | 2026-03-01 16:04:11 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-01 16:04:11 -0800 |
| commit | 48f0c30d47d62e4f35706edb93a1bb2f97eba14c (patch) | |
| tree | 44866d7a61adfdf01a780e0108c370294d3db78b /src/lib/Layout/TextTransition.svelte | |
| parent | chore(biome): re-enable useAltText rule (diff) | |
| download | due.moe-48f0c30d47d62e4f35706edb93a1bb2f97eba14c.tar.xz due.moe-48f0c30d47d62e4f35706edb93a1bb2f97eba14c.zip | |
chore(biome): enable svelte formatting
Diffstat (limited to 'src/lib/Layout/TextTransition.svelte')
| -rw-r--r-- | src/lib/Layout/TextTransition.svelte | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/Layout/TextTransition.svelte b/src/lib/Layout/TextTransition.svelte index 35cfe1ea..13a4ed9b 100644 --- a/src/lib/Layout/TextTransition.svelte +++ b/src/lib/Layout/TextTransition.svelte @@ -1,24 +1,24 @@ <script> - import { tweened } from 'svelte/motion'; - import { cubicOut } from 'svelte/easing'; +import { tweened } from 'svelte/motion'; +import { cubicOut } from 'svelte/easing'; - export let text = ''; - export let opacityTransitionDuration = 50; - export let blurTransitionDuration = opacityTransitionDuration; - export let easing = cubicOut; +export let text = ''; +export let opacityTransitionDuration = 50; +export let blurTransitionDuration = opacityTransitionDuration; +export let easing = cubicOut; - let previousValue = ''; - let opacity = tweened(1, { duration: opacityTransitionDuration, easing }); - let blur = tweened(0, { duration: blurTransitionDuration, easing }); +let previousValue = ''; +let opacity = tweened(1, { duration: opacityTransitionDuration, easing }); +let blur = tweened(0, { duration: blurTransitionDuration, easing }); - $: { - if (text !== previousValue) - Promise.all([opacity.set(0), blur.set(10)]).then(() => { - previousValue = text; +$: { + if (text !== previousValue) + Promise.all([opacity.set(0), blur.set(10)]).then(() => { + previousValue = text; - Promise.all([opacity.set(1), blur.set(0)]); - }); - } + Promise.all([opacity.set(1), blur.set(0)]); + }); +} </script> <span |