Function
slideIn
(direction, type, delay, duration)
Source from the content-addressed store, hash-verified
| 57 | }; |
| 58 | |
| 59 | export const slideIn = (direction, type, delay, duration) => { |
| 60 | return { |
| 61 | hidden: { |
| 62 | x: direction === "left" ? "-100%" : direction === "right" ? "100%" : 0, |
| 63 | y: direction === "up" ? "100%" : direction === "down" ? "100%" : 0, |
| 64 | }, |
| 65 | show: { |
| 66 | x: 0, |
| 67 | y: 0, |
| 68 | transition: { |
| 69 | type: type, |
| 70 | delay: delay, |
| 71 | duration: duration, |
| 72 | ease: "easeOut", |
| 73 | }, |
| 74 | }, |
| 75 | }; |
| 76 | }; |
| 77 | |
| 78 | export const staggerContainer = (staggerChildren, delayChildren) => { |
| 79 | return { |
Tested by
no test coverage detected