mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
34 lines
558 B
TypeScript
34 lines
558 B
TypeScript
'use client';
|
|
|
|
import { motion } from 'framer-motion';
|
|
|
|
type AnimateGenericFadeInOutProps = {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
motionKey?: string;
|
|
};
|
|
|
|
export const AnimateGenericFadeInOut = ({
|
|
children,
|
|
className,
|
|
motionKey,
|
|
}: AnimateGenericFadeInOutProps) => {
|
|
return (
|
|
<motion.section
|
|
key={motionKey}
|
|
initial={{
|
|
opacity: 0,
|
|
}}
|
|
animate={{
|
|
opacity: 1,
|
|
}}
|
|
exit={{
|
|
opacity: 0,
|
|
}}
|
|
className={className}
|
|
>
|
|
{children}
|
|
</motion.section>
|
|
);
|
|
};
|