✨ Rework About page Process section
This commit is contained in:
25
src/animations/transitions.ts
Normal file
25
src/animations/transitions.ts
Normal file
@@ -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,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user