Files
asan-installer-front/src/transition/index.tsx
T
2024-08-19 13:29:46 +03:30

24 lines
553 B
TypeScript

import { PropsWithChildren } from "react"
import { motion } from "framer-motion"
export const TransitionPages = ({ children }: PropsWithChildren) => {
const animations = {
initial: {
opacity: 0,
x: 100
},
animate: {
opacity: 1,
x: 0
},
exit: {
opacity: 0,
x: -100
}
}
return (
<motion.div variants={animations} initial="initial" animate="animate" exit="exit">
{children}
</motion.div>
)
}