From f05a472585b2506da21aed71f0252b2d4c04a221 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Mon, 5 Feb 2024 04:15:02 +0530 Subject: React Slides * Adds useState * State * useEffect * Side Effects --- src/lib/motion/utils.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/lib/motion/utils.ts (limited to 'src/lib/motion/utils.ts') diff --git a/src/lib/motion/utils.ts b/src/lib/motion/utils.ts new file mode 100644 index 0000000..a81c02e --- /dev/null +++ b/src/lib/motion/utils.ts @@ -0,0 +1,10 @@ +import { onMount } from 'svelte' +import type { AnimationFn } from './types' + +export function animate(fn: AnimationFn) { + onMount(fn) +} + +export function all(...animations: AnimationFn[]) { + return Promise.all(animations) +} -- cgit v1.2.3