Skip to content

Commit

Permalink
Merge pull request #857 from w3bdesign/develop
Browse files Browse the repository at this point in the history
Version 1.27
  • Loading branch information
w3bdesign authored May 31, 2022
2 parents f739f11 + a6d072d commit 8fbae08
Show file tree
Hide file tree
Showing 3 changed files with 208 additions and 179 deletions.
35 changes: 35 additions & 0 deletions components/Animations/FadeUp.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// CircleCI doesn't like import { motion } from "framer-motion" here, so we use require
const { motion } = require('framer-motion');

/**
* Fade up content animation
* @function FadeUp
* @param {ReactNode} children - Children content to render
* @param {string} cssClass - CSS classes to apply to component
* @param {number} delay - Time to wait before starting animation
* @returns {JSX.Element} - Rendered component
*/

const FadeUp = ({ children, cssClass, delay }) => {
const fadeUpVariants = {
initial: { opacity: 0, y: 20 },
animate: {
y: 0,
opacity: 1,
transition: { delay, type: 'spring', duration: 0.5, stiffness: 110 },
},
};
return (
<motion.div
className={cssClass}
variants={fadeUpVariants}
initial="initial"
animate="animate"
data-testid="fadeup"
>
{children}
</motion.div>
);
};

export default FadeUp;
Loading

1 comment on commit 8fbae08

@vercel
Copy link

@vercel vercel bot commented on 8fbae08 May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.