Files
documenso/packages/ui/components/animate/animate-generic-fade-in-out.tsx
2025-02-13 14:10:38 +11:00

32 lines
543 B
TypeScript

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>
);
};