1+ import { BenefitsElements } from '@/core/mocks/mock-benefits'
2+ import { motion } from 'framer-motion'
13import React from 'react'
4+ import { MagicCard } from "@/components/ui/magic-card" ;
5+ import { Link } from 'react-router-dom' ;
6+ import { useTheme } from "@/hooks/use-theme" ;
7+ import { cardBenefitsVariants } from '@/core/variants/varaints' ;
28
39const Benefits : React . FC = ( ) => {
10+ const { theme } = useTheme ( ) ;
11+
412 return (
5- < div >
6- Benefits
7- </ div >
13+ < section className = 'py-6 md:py-10 lg:py-12' >
14+ < div className = "container grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-2 md:gap-4" >
15+ {
16+ BenefitsElements . map ( ( ele , index ) => (
17+ < motion . div
18+ key = { ele . id }
19+ custom = { index }
20+ variants = { cardBenefitsVariants }
21+ initial = "hidden"
22+ whileInView = "visible"
23+ viewport = { { once : true , amount : .2 } }
24+ className = 'w-auto relative'
25+ >
26+ < MagicCard
27+ className = "flex flex-col items-center justify-center text-center gap-4 shadow-none p-4 md:p-6"
28+ gradientColor = { theme === "dark" ? "#262626" : "#D9D9D955" }
29+ >
30+ < Link
31+ to = { ele . link }
32+ className = "inline-block p-2 md:p-3 rounded-full bg-foreground/90 hover:bg-foreground text-center text-background/90 hover:text-background duration-300 text-lg md:text-xl"
33+ >
34+ { ele . icon }
35+ </ Link >
36+
37+ < Link
38+ to = { ele . link }
39+ className = ""
40+ >
41+ < h4 className = "text-sm md:text-sm font-medium capitalize text-center text-foreground/90 hover:text-foreground duration-300" >
42+ { ele . content }
43+ </ h4 >
44+ </ Link >
45+ </ MagicCard >
46+ </ motion . div >
47+ ) )
48+ }
49+ </ div >
50+ </ section >
851 )
952}
1053
1154export default Benefits
55+
56+
57+ /*
58+ import { BenefitsElements } from '@/core/mocks/mock-benefits'
59+ import React from 'react'
60+ import { motion } from 'framer-motion';
61+ import { MagicCard } from "@/components/ui/magic-card";
62+ // import { useTheme } from "@/hooks/use-theme";
63+ import { Link } from 'react-router-dom';
64+
65+ const Benefits: React.FC = () => {
66+ // const { theme } = useTheme();
67+
68+ return (
69+ <section className='py-6 md:py-10 lg:py-12'>
70+ <div className="container flex justify-between">
71+ {
72+ BenefitsElements.map((ele) => (
73+ <motion.div
74+ key={ele.id}
75+ >
76+ <MagicCard
77+ className="flex flex-col items-center shadow-2xl"
78+ // gradientColor={theme === "dark" ? "#262626" : "#D9D9D955"}
79+ >
80+ <Link
81+ to={ele.link}
82+ className="inline-block p-4 rounded-full bg-foreground/80 hover:bg-foreground text-center text-background/80 hover:text-background"
83+ >
84+ {ele.icon}
85+ <Link>
86+ </MagicCard>
87+ </motion.div>
88+ ))
89+ }
90+ </div>
91+ </section>
92+ )
93+ }
94+ export default Benefits
95+
96+ */
0 commit comments