blowfish/src/components/Animations.js

37 lines
578 B
JavaScript
Raw Normal View History

2019-05-11 20:16:18 +02:00
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
})
}
}