You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
642 B
30 lines
642 B
import React, { ReactNode } from 'react'
|
|
import { motion } from 'framer-motion'
|
|
|
|
interface AnimatedScrollWrapperProps {
|
|
children: ReactNode
|
|
}
|
|
const AnimatedScrollWrapper = ({ children }: AnimatedScrollWrapperProps) => {
|
|
return (
|
|
<motion.div
|
|
variants={{
|
|
hidden: { opacity: 0, y: 10 },
|
|
visible: {
|
|
opacity: 1,
|
|
y: 0,
|
|
transition: {
|
|
duration: 0.5,
|
|
ease: 'easeInOut',
|
|
// delay: 0.25,
|
|
},
|
|
},
|
|
}}
|
|
initial='hidden'
|
|
whileInView='visible'
|
|
>
|
|
{children}
|
|
</motion.div>
|
|
)
|
|
}
|
|
|
|
export default AnimatedScrollWrapper
|