Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | /** * @file MotionWrapper.tsx * A simple framer-motion wrapper with tasteful entrance + hover animations */ import React from "react"; import { motion } from "framer-motion"; type Props = { children: React.ReactNode; delay?: number; hoverLift?: boolean; className?: string; }; export const MotionWrapper: React.FC<Props> = ({ children, delay = 0, hoverLift = true, className, }) => { return ( <motion.div className={className} initial={{ opacity: 0, y: 14, scale: 0.98 }} animate={{ opacity: 1, y: 0, scale: 1 }} transition={{ duration: 0.5, ease: "easeOut", delay }} whileHover={hoverLift ? { y: -3 } : undefined} > {children} </motion.div> ); }; |