diff --git a/src/animations/transitions.ts b/src/animations/transitions.ts new file mode 100644 index 0000000..350c4e4 --- /dev/null +++ b/src/animations/transitions.ts @@ -0,0 +1,25 @@ +import { animate } from 'motion' +import { quartOut } from './easings' + +export const scaleFade = (node: HTMLElement, { + delay = 0, + duration = 1, + scale = [0.7, 1], + opacity = [1, 0], + x = null, +}) => { + return { + css: () => { + animate(node, { + scale, + opacity, + x, + z: 0, + }, { + easing: quartOut, + duration, + delay, + }) + } + } +} \ No newline at end of file diff --git a/src/components/molecules/ProcessStep.svelte b/src/components/molecules/ProcessStep.svelte index c18a362..9652a3e 100644 --- a/src/components/molecules/ProcessStep.svelte +++ b/src/components/molecules/ProcessStep.svelte @@ -3,53 +3,60 @@ -