diff --git a/apps/dimentorin/src/app/(public)/(home)/_components/what-we-offer-section.tsx b/apps/dimentorin/src/app/(public)/(home)/_components/what-we-offer-section.tsx index 3473fc7..46d3e75 100644 --- a/apps/dimentorin/src/app/(public)/(home)/_components/what-we-offer-section.tsx +++ b/apps/dimentorin/src/app/(public)/(home)/_components/what-we-offer-section.tsx @@ -1,6 +1,6 @@ import { Button } from "@imphnen-frontend-service/ui/atoms"; -import { FC } from "react"; -import { motion } from 'framer-motion' +import { FC, useRef } from "react"; +import { motion, useInView, Variants } from 'framer-motion' import { For } from "../../../_components/logic/for"; const OFFERS: { title: string; description: string; image: string }[] = [ @@ -10,12 +10,39 @@ const OFFERS: { title: string; description: string; image: string }[] = [ ] export const WhatWeOfferSection: FC = () => { + const ref = useRef(null) + const isInView = useInView(ref, { once: true, amount: 0.2 }) + + const containerVariants: Variants = { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.1, + delayChildren: 0.2, + }, + }, + } + + const childVariants: Variants = { + hidden: { opacity: 0, y: 20 }, + visible: { + opacity: 1, + y: 0, + transition: { + duration: 0.4, + ease: [0.25, 0.46, 0.45, 0.94], + }, + }, + } + return ( -
+
-
+ {(offer) => ( {offer.title}
{ )} -
+
) } \ No newline at end of file