import { useRef } from 'react'; import { motion, useInView } from 'framer-motion'; /* Fade/slide in when element scrolls into view */ export default function AnimatedContent({ children, className = '', delay = 0, direction = 'up', // 'up' | 'down' | 'left' | 'right' | 'none' distance = 30, duration = 0.55, }) { const ref = useRef(null); const inView = useInView(ref, { once: true, margin: '-60px' }); const dirMap = { up: { y: distance }, down: { y: -distance }, left: { x: distance }, right: { x: -distance }, none: {}, }; return ( {children} ); }