Files
MOPC-Portal/src/components/shared/animated-container.tsx

29 lines
657 B
TypeScript
Raw Normal View History

'use client'
import { motion } from 'motion/react'
import { type ReactNode } from 'react'
export function AnimatedCard({ children, index = 0 }: { children: ReactNode; index?: number }) {
return (
<motion.div
initial={{ opacity: 0, y: 12 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, delay: index * 0.05, ease: 'easeOut' }}
>
{children}
</motion.div>
)
}
export function AnimatedList({ children }: { children: ReactNode }) {
return (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.3 }}
>
{children}
</motion.div>
)
}