@@ -25,6 +25,23 @@ export default function HeroConverter({
2525 const [ busy , setBusy ] = useState ( false ) ;
2626 const [ hint , setHint ] = useState ( "or drop files here" ) ;
2727 const [ dropEffect , setDropEffect ] = useState < string > ( "" ) ;
28+ const [ randomColor ] = useState ( ( ) => {
29+ const colors = [
30+ "#ef4444" , // red-500
31+ "#f59e0b" , // amber-500
32+ "#22c55e" , // green-500
33+ "#3b82f6" , // blue-500
34+ "#a855f7" , // purple-500
35+ "#ec4899" , // pink-500
36+ "#14b8a6" , // teal-500
37+ "#f97316" , // orange-500
38+ "#6366f1" , // indigo-500
39+ "#f43f5e" , // rose-500
40+ "#0ea5e9" , // sky-500
41+ "#84cc16" , // lime-500
42+ ] ;
43+ return colors [ Math . floor ( Math . random ( ) * colors . length ) ] ;
44+ } ) ;
2845
2946 function ensureWorker ( ) {
3047 if ( ! workerRef . current ) {
@@ -111,27 +128,31 @@ export default function HeroConverter({
111128 : `.${ from } ` ) ;
112129
113130 return (
114- < section className = "min-h-[60vh] w-full bg-white" >
115- < div className = "mx-auto max-w-4xl px-6 pt-12 pb-8 text-center" >
116- < h1 className = "text-3xl sm:text-4xl font-extrabold tracking-tight" > { title } </ h1 >
117- < p className = "mt-3 text-muted-foreground" > { subtitle } </ p >
118-
131+ < section className = "w-full bg-white" >
132+ < div className = "mx-auto max-w-7xl px-6 py-8 text-center" >
119133 < div
120134 ref = { dropRef }
121135 onDragEnter = { onDrag }
122136 onDragOver = { onDrag }
123137 onDragLeave = { onDrag }
124138 onDrop = { onDrop }
125- className = { `mt-8 mx-auto max-w-2xl border-2 border-dashed border-gray-300 rounded-2xl p-12 hover:border-gray-400 transition-colors cursor-pointer bg-gray-50/50 ${
139+ className = { `mt-8 mx-auto max-w-6xl border-2 border-dashed rounded-2xl p-12 hover:border-opacity-80 transition-colors cursor-pointer ${
126140 dropEffect ? `animate-${ dropEffect } ` : ""
127141 } `}
142+ style = { {
143+ backgroundColor : randomColor + "15" , // 15 is ~8% opacity
144+ borderColor : randomColor ,
145+ } }
128146 onClick = { onPick }
129147 >
130148 < div className = "flex flex-col items-center space-y-6" >
149+ < h1 className = "text-3xl sm:text-4xl font-extrabold tracking-tight" > { title } </ h1 >
150+
131151 < svg
132- className = "w-16 h-16 text-gray-400 "
152+ className = "w-12 h-12 "
133153 fill = "none"
134154 stroke = "currentColor"
155+ style = { { color : randomColor } }
135156 viewBox = "0 0 24 24"
136157 >
137158 < path
@@ -144,19 +165,22 @@ export default function HeroConverter({
144165
145166 < Button
146167 size = "lg"
147- className = "h-14 px-8 rounded-xl bg-blue-600 hover:bg-blue-700 text-white shadow-lg"
168+ className = "h-12 px-8 rounded-xl text-white shadow-lg"
169+ style = { {
170+ backgroundColor : randomColor ,
171+ borderColor : randomColor ,
172+ } }
148173 onClick = { ( e ) => {
149174 e . stopPropagation ( ) ;
150175 onPick ( ) ;
151176 } }
152177 disabled = { busy }
153178 >
154- { busy ? "Working…" : `Select ${ from . toUpperCase ( ) } files ` }
179+ { busy ? "Working…" : `CHOOSE FILES ` }
155180 </ Button >
156181
157- < div className = "text-sm text-muted-foreground" >
182+ < div className = "text-sm" style = { { color : randomColor } } >
158183 < p className = "font-medium" > { hint } </ p >
159- < p className = "mt-1 text-xs" > or click anywhere in this box</ p >
160184 </ div >
161185 </ div >
162186
0 commit comments