diff options
| author | Fuwn <[email protected]> | 2024-10-09 00:41:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-09 00:41:43 -0700 |
| commit | 998b63a35256ac985a5a2714dd1ca451af4dfd8a (patch) | |
| tree | 50796121a9d5ab0330fdc5d7e098bda2860d9726 /src/lib/Layout/NumberTicker.svelte | |
| parent | feat(graphql): add badgeCount field (diff) | |
| download | due.moe-998b63a35256ac985a5a2714dd1ca451af4dfd8a.tar.xz due.moe-998b63a35256ac985a5a2714dd1ca451af4dfd8a.zip | |
chore(prettier): use spaces instead of tabs
Diffstat (limited to 'src/lib/Layout/NumberTicker.svelte')
| -rw-r--r-- | src/lib/Layout/NumberTicker.svelte | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/Layout/NumberTicker.svelte b/src/lib/Layout/NumberTicker.svelte index 1d09c3ef..b5e2f49c 100644 --- a/src/lib/Layout/NumberTicker.svelte +++ b/src/lib/Layout/NumberTicker.svelte @@ -1,36 +1,36 @@ <script> - import { tweened } from 'svelte/motion'; - import { cubicOut } from 'svelte/easing'; + import { tweened } from 'svelte/motion'; + import { cubicOut } from 'svelte/easing'; - export let start = 0; - export let end = 100; - export let duration = 2000; - export let delay = 0; + export let start = 0; + export let end = 100; + export let duration = 2000; + export let delay = 0; - const count = tweened(start, { - duration: duration, - easing: cubicOut, - delay: delay - }); + const count = tweened(start, { + duration: duration, + easing: cubicOut, + delay: delay + }); - $: { - count.set(end); - } + $: { + count.set(end); + } </script> <span class="counter" class:visible={$count !== start}> - {Math.round($count)} + {Math.round($count)} </span> <style lang="scss"> - .counter { - $duration: 0.2s; + .counter { + $duration: 0.2s; - opacity: 0; - transition: opacity $duration ease-out, transform $duration ease-out; - } + opacity: 0; + transition: opacity $duration ease-out, transform $duration ease-out; + } - .counter.visible { - opacity: 1; - } + .counter.visible { + opacity: 1; + } </style> |