1+ import React from 'react' ;
2+
3+ interface OverviewCardProps {
4+ title : string ;
5+ description : string | React . ReactNode ;
6+ href : string ;
7+ icon : string ;
8+ }
9+
10+ const OverviewCard : React . FC < OverviewCardProps > = ( { title, description, href, icon } ) => {
11+ return (
12+ < a href = { href } className = "service-box" style = { { display : 'flex' , flexDirection : 'column' , alignItems : 'flex-start' } } >
13+ < img src = { icon } alt = { `${ title } icon` } width = { 40 } height = { 40 } style = { { marginBottom : '1rem' } } />
14+ < div className = "service-box-content" >
15+ < div className = "service-box-title" > { title } </ div >
16+ < div className = "service-box-description" > { description } </ div >
17+ </ div >
18+ </ a >
19+ ) ;
20+ } ;
21+
22+ interface OverviewCardsProps {
23+ cards : OverviewCardProps [ ] ;
24+ }
25+
26+ export const OverviewCards : React . FC < OverviewCardsProps > = ( { cards } ) => {
27+ return (
28+ < div className = "service-grid" >
29+ { cards . map ( ( card , index ) => (
30+ < OverviewCard key = { index } { ...card } />
31+ ) ) }
32+ </ div >
33+ ) ;
34+ } ;
35+
36+ interface HeroCardProps {
37+ title : string ;
38+ href ?: string ;
39+ }
40+
41+ const HeroCard : React . FC < HeroCardProps > = ( { title, href = "" } ) => {
42+ const cardStyle = {
43+ display : 'flex' ,
44+ alignItems : 'center' ,
45+ justifyContent : 'center' ,
46+ minHeight : '200px' ,
47+ padding : '2rem' ,
48+ borderRadius : '0.75rem' ,
49+ background : ' #654fec' ,
50+ color : 'white' ,
51+ textDecoration : 'none' ,
52+ fontSize : '1.5rem' ,
53+ fontWeight : '600' ,
54+ textAlign : 'center' as const ,
55+ transition : 'transform 0.2s ease' ,
56+ cursor : href ? 'pointer' : 'default'
57+ } ;
58+
59+ const hoverStyle = {
60+ ':hover' : {
61+ transform : href ? 'scale(1.02)' : 'none'
62+ }
63+ } ;
64+
65+ if ( href ) {
66+ return (
67+ < a href = { href } style = { cardStyle } >
68+ { title }
69+ </ a >
70+ ) ;
71+ }
72+
73+ return (
74+ < div style = { cardStyle } >
75+ { title }
76+ </ div >
77+ ) ;
78+ } ;
79+
80+ interface HeroCardsProps {
81+ cards : HeroCardProps [ ] ;
82+ }
83+
84+ export const HeroCards : React . FC < HeroCardsProps > = ( { cards } ) => {
85+ return (
86+ < div style = { {
87+ display : 'grid' ,
88+ gridTemplateColumns : 'repeat(auto-fit, minmax(300px, 1fr))' ,
89+ gap : '2rem' ,
90+ marginBottom : '3rem'
91+ } } >
92+ { cards . map ( ( card , index ) => (
93+ < HeroCard key = { index } { ...card } />
94+ ) ) }
95+ </ div >
96+ ) ;
97+ } ;
0 commit comments