27 lines
489 B
TypeScript
27 lines
489 B
TypeScript
"use client";
|
|
|
|
import { motion } from "framer-motion";
|
|
import { ReactNode } from "react";
|
|
|
|
interface PageTransitionProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
/**
|
|
* Page Transition Wrapper
|
|
* Fade in/out with Framer Motion
|
|
*/
|
|
export function PageTransition({ children }: PageTransitionProps) {
|
|
return (
|
|
<motion.div
|
|
initial={{ opacity: 0 }}
|
|
animate={{ opacity: 1 }}
|
|
exit={{ opacity: 0 }}
|
|
transition={{ duration: 0.2 }}
|
|
>
|
|
{children}
|
|
</motion.div>
|
|
);
|
|
}
|
|
|