File size: 843 Bytes
4114d85 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
import PropTypes from 'prop-types'
import { motion } from 'framer-motion'
// ==============================|| ANIMATION FOR CONTENT ||============================== //
const NavMotion = ({ children }) => {
const motionVariants = {
initial: {
opacity: 0,
scale: 0.99
},
in: {
opacity: 1,
scale: 1
},
out: {
opacity: 0,
scale: 1.01
}
}
const motionTransition = {
type: 'tween',
ease: 'anticipate',
duration: 0.4
}
return (
<motion.div initial='initial' animate='in' exit='out' variants={motionVariants} transition={motionTransition}>
{children}
</motion.div>
)
}
NavMotion.propTypes = {
children: PropTypes.node
}
export default NavMotion
|