37 lines
578 B
JavaScript
37 lines
578 B
JavaScript
|
export const defaultAnimation = {
|
||
|
enter: {
|
||
|
y: 0,
|
||
|
opacity: 1,
|
||
|
delay: 100,
|
||
|
transition: { duration: 150 }
|
||
|
},
|
||
|
exit: {
|
||
|
y: 50,
|
||
|
opacity: 0,
|
||
|
transition: { duration: 150 }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export const fadeIn = {
|
||
|
enter: {
|
||
|
opacity: 1,
|
||
|
transition: { duration: 600 }
|
||
|
},
|
||
|
exit: {
|
||
|
opacity: 0,
|
||
|
transition: { duration: 100 }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export const characterAnimation = {
|
||
|
exit: { opacity: 0, y: 10 },
|
||
|
enter: {
|
||
|
opacity: 1,
|
||
|
y: 0,
|
||
|
transition: ({ charInWordIndex }) => ({
|
||
|
type: 'spring',
|
||
|
delay: charInWordIndex * 20
|
||
|
})
|
||
|
}
|
||
|
}
|