@@ -12,18 +12,40 @@ function getLogoSrc(logo?: string | { src?: string }) {
1212}
1313
1414function SupportUsButton ( {
15+ Theme = "dark" ,
16+ pattern = "none" ,
1517 hero,
1618 organizationInformation,
1719 sponsors,
1820 ctaSection,
21+ classNames = { } ,
22+ buttonVariant = "AOSSIE" ,
1923} : supportUsButtonProps ) {
2024 const logo = getLogoSrc ( organizationInformation . logo ) ;
2125
22- return (
23- < div className = "relative min-h-screen bg-black text-white overflow-hidden" >
26+ // Dynamic Theme Logic
27+ const isDark = Theme === "dark" || Theme === "AOSSIE" ;
28+ const bgClass = isDark ? "bg-black text-white" : "bg-gray-50 text-gray-900" ;
29+ const cardClass = isDark
30+ ? "bg-white/5 border-white/10 backdrop-blur-2xl"
31+ : "bg-white border-gray-200 shadow-xl" ;
32+ const subTextClass = isDark ? "text-gray-400" : "text-gray-600" ;
2433
25- { /* 🔥 Background Glow */ }
26- < div className = "absolute inset-0 bg-[radial-gradient(circle_at_top,_rgba(255,215,0,0.15),_transparent_60%)]" > </ div >
34+ return (
35+ < div className = { `relative min-h-screen overflow-hidden transition-colors duration-500 ${ bgClass } ${ classNames . container || "" } ` } >
36+
37+ { /* Background Glow (Adjusts based on Theme) */ }
38+ < div className = { `absolute inset-0 ${ isDark
39+ ? "bg-[radial-gradient(circle_at_top,_rgba(255,215,0,0.15),_transparent_60%)]"
40+ : "bg-[radial-gradient(circle_at_top,_rgba(255,215,0,0.05),_transparent_60%)]" } `}
41+ />
42+
43+ { /* Pattern Overlay (Supporting the pattern prop) */ }
44+ { pattern !== "none" && (
45+ < div className = "absolute inset-0 opacity-10 pointer-events-none"
46+ style = { { backgroundImage : `url('/patterns/${ pattern } .svg')` } }
47+ />
48+ ) }
2749
2850 < div className = "relative z-10 max-w-7xl mx-auto px-6 py-20" >
2951
@@ -32,12 +54,12 @@ function SupportUsButton({
3254 initial = { { opacity : 0 , y : 40 } }
3355 animate = { { opacity : 1 , y : 0 } }
3456 transition = { { duration : 0.8 } }
35- className = " text-center mb-24"
57+ className = { ` text-center mb-24 ${ classNames . Hero || "" } ` }
3658 >
3759 < motion . div
3860 animate = { { scale : [ 1 , 1.1 , 1 ] } }
3961 transition = { { repeat : Infinity , duration : 2 } }
40- className = "w-16 h-16 mx-auto mb-6 rounded-full bg-gradient-to-r from-yellow-400 to-yellow-600 flex items-center justify-center shadow-lg"
62+ className = "w-16 h-16 mx-auto mb-6 rounded-full bg-gradient-to-r from-yellow-400 to-yellow-600 flex items-center justify-center shadow-lg text-2xl "
4163 >
4264 ❤️
4365 </ motion . div >
@@ -46,7 +68,7 @@ function SupportUsButton({
4668 { hero . title }
4769 </ h1 >
4870
49- < p className = "text-gray-400 text-lg max-w-xl mx-auto" >
71+ < p className = { ` ${ subTextClass } text-lg max-w-xl mx-auto` } >
5072 { hero . description }
5173 </ p >
5274 </ motion . div >
@@ -56,49 +78,51 @@ function SupportUsButton({
5678 initial = { { opacity : 0 , y : 60 } }
5779 animate = { { opacity : 1 , y : 0 } }
5880 transition = { { delay : 0.2 } }
59- className = " relative bg-white/5 backdrop-blur-2xl border border-white/10 rounded-3xl p-10 mb-24 shadow-[0_0_80px_rgba(255,215,0,0.15)]"
81+ className = { ` relative border rounded-3xl p-10 mb-24 shadow-[0_0_80px_rgba(255,215,0,0.1)] ${ cardClass } ${ classNames . organizationInformation || "" } ` }
6082 >
6183 { hero . sponsorLabel && (
62- < p className = "text-yellow-400 text-xs uppercase tracking-widest mb-4" >
84+ < p className = "text-yellow-500 font-bold text-xs uppercase tracking-widest mb-4" >
6385 { hero . sponsorLabel }
6486 </ p >
6587 ) }
6688
6789 < div className = "flex items-center gap-6 flex-wrap" >
68- { /* Logo */ }
6990 { logo ? (
7091 < img
7192 src = { logo }
7293 alt = { organizationInformation . name }
73- className = "w-20 h-20 rounded-xl object-cover bg-white"
94+ className = "w-20 h-20 rounded-xl object-cover bg-white shadow-sm "
7495 />
7596 ) : (
76- < div className = "w-20 h-20 rounded-xl bg-gray-700 flex items-center justify-center" >
77- < span className = "text-xs" > No Logo</ span >
97+ < div className = { `w-20 h-20 rounded-xl flex items-center justify-center border-2 border-dashed ${
98+ isDark
99+ ? "bg-white/5 border-white/10 text-gray-500"
100+ : "bg-gray-100 border-gray-300 text-gray-400"
101+ } `} >
102+ < span className = "text-[10px] uppercase font-bold tracking-tighter" > No Logo</ span >
78103 </ div >
79104 ) }
80105
81- { /* Org Info */ }
106+
82107 < div >
83108 < h2 className = "text-3xl font-bold" >
84109 { organizationInformation . name }
85110 </ h2 >
86- < p className = "text-gray-400" >
111+ < p className = { subTextClass } >
87112 { organizationInformation . description }
88113 </ p >
89114 </ div >
90115 </ div >
91116
92- { /* PROJECT */ }
93117 { organizationInformation . projectInformation && (
94- < div className = " mt-8 p-6 bg-black/40 rounded-xl border border -white/10">
95- < p className = "text-yellow-400 text-sm mb-1" >
118+ < div className = { ` mt-8 p-6 rounded-xl border ${ isDark ? " bg-black/40 border-white/10" : "bg-gray-50 border-gray-100" } ` } >
119+ < p className = "text-yellow-500 text-sm font-semibold mb-1" >
96120 About Project
97121 </ p >
98122 < h3 className = "font-semibold" >
99123 { organizationInformation . projectInformation . name }
100124 </ h3 >
101- < p className = "text-gray-400 italic" >
125+ < p className = { ` ${ subTextClass } italic` } >
102126 "{ organizationInformation . projectInformation . description } "
103127 </ p >
104128 </ div >
@@ -107,7 +131,7 @@ function SupportUsButton({
107131
108132 { /* ================= SPONSORS ================= */ }
109133 { sponsors && sponsors . length > 0 && (
110- < div className = " mb-24" >
134+ < div className = { ` mb-24 ${ classNames . sponsors || "" } ` } >
111135 < h2 className = "text-4xl font-bold text-center mb-12" >
112136 Our Sponsors
113137 </ h2 >
@@ -120,30 +144,25 @@ function SupportUsButton({
120144 target = "_blank"
121145 rel = "noopener noreferrer"
122146 whileHover = { { scale : 1.05 } }
123- className = " group relative bg-white/5 border border-white/10 rounded-2xl p-6 overflow-hidden"
147+ className = { ` group relative border rounded-2xl p-6 overflow-hidden transition-all ${ cardClass } ` }
124148 >
125- { /* Glow */ }
126- < div className = "absolute inset-0 opacity-0 group-hover:opacity-100 transition bg-gradient-to-r from-yellow-400/20 to-transparent blur-xl" > </ div >
149+ < div className = "absolute inset-0 opacity-0 group-hover:opacity-100 transition bg-gradient-to-r from-yellow-400/10 to-transparent blur-xl" > </ div >
127150
128151 < div className = "relative z-10 text-center" >
129152 { s . logo ? (
130153 < img
131154 src = { s . logo }
132155 alt = { s . name }
133- className = "h-24 mx-auto object-contain mb-4"
156+ className = "h-20 mx-auto object-contain mb-4 filter drop-shadow-sm "
134157 />
135158 ) : (
136- < div className = "h-24 flex items-center justify-center bg-gray-700 rounded" >
137- < span > No Logo</ span >
159+ < div className = { `h-20 flex items-center justify-center rounded mb-4 ${ isDark ? " bg-gray-800" : "bg-gray-100" } ` } >
160+ < span className = "text-sm opacity-50" > No Logo</ span >
138161 </ div >
139162 ) }
140-
141163 < h3 className = "font-semibold" > { s . name } </ h3 >
142-
143164 { s . sponsorshipTier && (
144- < p className = "text-gray-400 text-sm" >
145- { s . sponsorshipTier }
146- </ p >
165+ < p className = { `${ subTextClass } text-sm` } > { s . sponsorshipTier } </ p >
147166 ) }
148167 </ div >
149168 </ motion . a >
@@ -157,13 +176,13 @@ function SupportUsButton({
157176 initial = { { opacity : 0 , y : 60 } }
158177 animate = { { opacity : 1 , y : 0 } }
159178 transition = { { delay : 0.3 } }
160- className = " text-center"
179+ className = { ` text-center ${ classNames . ctaSection || "" } ` }
161180 >
162181 < h2 className = "text-4xl font-bold mb-4" >
163182 { ctaSection . title }
164183 </ h2 >
165184
166- < p className = "text-gray-400 mb-8" >
185+ < p className = { ` ${ subTextClass } mb-8` } >
167186 { ctaSection . description }
168187 </ p >
169188
@@ -174,9 +193,13 @@ function SupportUsButton({
174193 href = { link . url }
175194 target = { link . newTab ? "_blank" : "_self" }
176195 rel = "noopener noreferrer"
177- whileHover = { { scale : 1.1 } }
196+ whileHover = { { scale : 1.05 } }
197+ whileTap = { { scale : 0.95 } }
178198 >
179- < button className = "px-6 py-3 rounded-xl bg-gradient-to-r from-yellow-400 to-yellow-600 text-black font-bold shadow-lg hover:shadow-yellow-500/30 transition" >
199+ < button className = { `px-8 py-4 rounded-xl font-bold shadow-lg transition-all
200+ ${ buttonVariant === "AOSSIE"
201+ ? "bg-gradient-to-r from-yellow-400 to-yellow-600 text-black hover:shadow-yellow-500/40"
202+ : "bg-blue-600 text-white hover:bg-blue-700" } `} >
180203 { link . name }
181204 </ button >
182205 </ motion . a >
@@ -189,4 +212,4 @@ function SupportUsButton({
189212 ) ;
190213}
191214
192- export default SupportUsButton ;
215+ export default SupportUsButton ;
0 commit comments