|
| 1 | +import { Heading, Paragraph } from '@/components/Typography'; |
| 2 | +import { WHY_ATTEND_INFO, WHY_ATTEND } from '@/whyAttend'; |
| 3 | +import Icon from '@/components/Icon'; |
| 4 | + |
| 5 | +const ReasonCard = ({ reason }) => { |
| 6 | + return ( |
| 7 | + <div |
| 8 | + className=" |
| 9 | + flex flex-col |
| 10 | + bg-white dark:bg-gray-800 |
| 11 | + shadow-md |
| 12 | + hover:shadow-xl |
| 13 | + transition-shadow duration-300 |
| 14 | + hover:-translate-y-1 |
| 15 | + p-6 |
| 16 | + border-b-2 border-transparent |
| 17 | + hover:border-primary-600 dark:hover:border-primary-400 |
| 18 | + " |
| 19 | + > |
| 20 | + {/* Icon Section */} |
| 21 | + <div className="mb-3 p-3 bg-gray-100 dark:bg-gray-700 rounded-xl w-fit"> |
| 22 | + <Icon |
| 23 | + name={reason.icon} |
| 24 | + size={24} |
| 25 | + className="text-primary-600 dark:text-primary-400" |
| 26 | + /> |
| 27 | + </div> |
| 28 | + |
| 29 | + {/* Content Section */} |
| 30 | + <div> |
| 31 | + <Heading |
| 32 | + tagLevel={3} |
| 33 | + level={6} |
| 34 | + className="mb-3 text-gray-900 dark:text-gray-50" |
| 35 | + > |
| 36 | + {reason.title} |
| 37 | + </Heading> |
| 38 | + |
| 39 | + <Paragraph level={4} className="text-gray-600 dark:text-gray-300"> |
| 40 | + {reason.description} |
| 41 | + </Paragraph> |
| 42 | + </div> |
| 43 | + </div> |
| 44 | + ); |
| 45 | +}; |
| 46 | + |
| 47 | +const WhyAttend = () => { |
| 48 | + return ( |
| 49 | + <section |
| 50 | + id="why-attend" |
| 51 | + className="scroll-mt-20 flex flex-col items-center py-16 w-11/12 lg:w-5/6 mx-auto" |
| 52 | + > |
| 53 | + {/* Section Header */} |
| 54 | + <div className="text-center mb-12"> |
| 55 | + <Heading |
| 56 | + tagLevel={2} |
| 57 | + level={1} |
| 58 | + className="mb-4 text-primary-600 dark:text-primary-400" |
| 59 | + > |
| 60 | + {WHY_ATTEND_INFO.title} |
| 61 | + </Heading> |
| 62 | + <Paragraph level={2} className="text-gray-600 dark:text-gray-300"> |
| 63 | + {WHY_ATTEND_INFO.description} |
| 64 | + </Paragraph> |
| 65 | + </div> |
| 66 | + |
| 67 | + {/* Cards Grid - 3 columns on large screens, 2 on medium, 1 on small */} |
| 68 | + <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 w-11/12 xl:w-3/4"> |
| 69 | + {WHY_ATTEND.map((reason) => ( |
| 70 | + <ReasonCard key={reason.id} reason={reason} /> |
| 71 | + ))} |
| 72 | + </div> |
| 73 | + </section> |
| 74 | + ); |
| 75 | +}; |
| 76 | + |
| 77 | +export default WhyAttend; |
0 commit comments