18 lines
387 B
JavaScript
18 lines
387 B
JavaScript
|
|
import React from 'react';
|
|
import { motion } from 'framer-motion';
|
|
|
|
const PageTransition = ({ children }) => {
|
|
return (
|
|
<motion.div
|
|
initial={{ opacity: 0, x: 20 }}
|
|
animate={{ opacity: 1, x: 0 }}
|
|
exit={{ opacity: 0, x: -20 }}
|
|
transition={{ duration: 0.3, ease: "easeInOut" }}
|
|
>
|
|
{children}
|
|
</motion.div>
|
|
);
|
|
};
|
|
|
|
export default PageTransition;
|