diff --git a/components/Animate/AnimationMap.ts b/components/Animate/AnimationMap.ts index ee160d2..6384847 100644 --- a/components/Animate/AnimationMap.ts +++ b/components/Animate/AnimationMap.ts @@ -125,5 +125,34 @@ export const AnimationMap = { height: "auto", }, }, + rotateInLeft: { + hidden: { + opacity: 0, + rotateY: 0, + }, + hiddenReduced: { + opacity: 0, + rotateY: 0, + }, + visible: { + opacity: 1, + rotateY: 15, + }, + }, + rotateInRight: { + hidden: { + opacity: 0, + rotateY: 0, + }, + hiddenReduced: { + opacity: 0, + rotateY: 0, + }, + visible: { + opacity: 1, + rotateY: -15, + }, + }, }; + export type AnimationType = keyof typeof AnimationMap | "none"; diff --git a/components/Timeline/TimelineAnimateImage.tsx b/components/Timeline/TimelineAnimateImage.tsx index 52bfcf3..36cf88b 100644 --- a/components/Timeline/TimelineAnimateImage.tsx +++ b/components/Timeline/TimelineAnimateImage.tsx @@ -1,6 +1,7 @@ "use client"; import Image from "next/image"; import { cnb } from "cnbuilder"; +import { AnimateInView } from "@/components/Animate"; import * as styles from "./Timeline.styles"; import * as types from "./Timeline.types"; import { motion } from "motion/react"; @@ -29,16 +30,12 @@ export const TimelineAnimateImage = ({ className, )} > - @@ -48,7 +45,7 @@ export const TimelineAnimateImage = ({ fill className="z-0 object-cover rounded-[20px] shadow-lg" /> - + ); }; diff --git a/components/Timeline/TimelineHorizontalCard.tsx b/components/Timeline/TimelineHorizontalCard.tsx index e730cd7..2cbd189 100644 --- a/components/Timeline/TimelineHorizontalCard.tsx +++ b/components/Timeline/TimelineHorizontalCard.tsx @@ -44,7 +44,7 @@ export const TimelineHorizontalCard = ({ {heading} @@ -75,7 +75,7 @@ export const TimelineHorizontalCard = ({