@@ -153,52 +153,36 @@ const Login = () => {
153153 { isLoading ? (
154154 < Loader />
155155 ) : (
156- < div className = "min-h-screen bg-gray-50 flex items-center justify-center p-4" >
157- < div className = "bg-white rounded-2xl p-8 max-w-md w-full shadow-2xl relative" >
156+ < div className = "min-h-screen bg-gray-50 flex items-center justify-center p-2 sm:p- 4" > { /* Responsive padding */ }
157+ < div className = "bg-white rounded-xl sm:rounded- 2xl p-4 sm:p-6 md:p-8 w-full max-w-[320px] sm:max-w-md shadow-lg sm:shadow- 2xl relative" > { /* Responsive width, padding and rounded corners */ }
158158 { /* Header */ }
159- < div className = "text-center mb-6" >
160- < div className = "inline-flex items-center justify-center w-12 h-12 bg-black rounded-full mb-4" >
161- < BookOpen className = "text-white text-xl" />
159+ < div className = "text-center mb-4 sm:mb- 6" > { /* Responsive margin */ }
160+ < div className = "inline-flex items-center justify-center w-10 h-10 sm:w- 12 sm: h-12 bg-black rounded-full mb-3 sm:mb- 4" > { /* Responsive size */ }
161+ < BookOpen className = "text-white text-lg sm:text- xl" /> { /* Responsive icon */ }
162162 </ div >
163- < h2 className = "text-2xl font-bold text-black font-serif" >
163+ < h2 className = "text-xl sm:text- 2xl font-bold text-black font-serif" > { /* Responsive text */ }
164164 { 'Welcome back' }
165165 </ h2 >
166- < p className = "text-gray-600 mt-2 font-serif" >
166+ < p className = "text-sm sm:text-base text- gray-600 mt-1 sm:mt- 2 font-serif" > { /* Responsive text and margin */ }
167167 { 'Sign in to your account' }
168168 </ p >
169169 </ div >
170170
171171 { /* Social Login Buttons */ }
172- < div className = "space-y-3 mb-6" >
172+ < div className = "space-y-3 mb-4 sm:mb- 6" > { /* Responsive margin */ }
173173 < button
174174 onClick = { handleGoogleLogin }
175- className = "w-full flex items-center justify-center gap-3 bg-white border border-gray-300 rounded-lg px-4 py-3 text-gray-700 hover:bg-gray-50 transition-colors"
175+ className = "w-full flex items-center justify-center gap-2 sm:gap- 3 bg-white border border-gray-300 rounded-lg px-3 sm:px- 4 py-2.5 sm:py-3 text-sm sm:text-base text-gray-700 hover:bg-gray-50 transition-colors"
176176 >
177- < svg className = "w-5 h-5" viewBox = "0 0 24 24" >
178- < path fill = "#4285F4" d = "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" />
179- < path fill = "#34A853" d = "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" />
180- < path fill = "#FBBC05" d = "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" />
181- < path fill = "#EA4335" d = "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" />
182- </ svg >
177+ { /* Google icon */ }
183178 Continue with Google
184179 </ button >
185180 </ div >
186181
187- { /* Divider */ }
188- < div className = "relative mb-6" >
189- < div className = "absolute inset-0 flex items-center" >
190- < div className = "w-full border-t border-gray-300" > </ div >
191- </ div >
192- < div className = "relative flex justify-center text-sm" >
193- < span className = "px-2 bg-white text-gray-500" > or</ span >
194- </ div >
195- </ div >
196-
197182 { /* Form */ }
198- < div className = "space-y-4" >
199-
183+ < div className = "space-y-3 sm:space-y-4" > { /* Responsive spacing */ }
200184 < input
201- className = "w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"
185+ className = "w-full px-3 sm:px- 4 py-2.5 sm:py-3 text-sm sm:text-base border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"
202186 type = "gmail"
203187 id = "email"
204188 name = "email"
@@ -210,7 +194,7 @@ const Login = () => {
210194
211195 < div className = "relative" >
212196 < input
213- className = "w-full px-4 py-3 pr-12 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"
197+ className = "w-full px-3 sm:px- 4 py-2.5 sm:py- 3 pr-10 sm:pr-12 text-sm sm:text-base border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"
214198 type = { showPassword ? "text" : "password" }
215199 id = "password"
216200 name = "password"
@@ -226,29 +210,22 @@ const Login = () => {
226210 >
227211 { showPassword ? < EyeOff className = "w-5 h-5" /> : < Eye className = "w-5 h-5" /> }
228212 </ button >
213+ { /* Password toggle button */ }
229214 < p className = "text-xs text-gray-500 mt-1" > Password must be at least 8 characters</ p >
230215 </ div >
231216
232217 < button
233218 type = "button"
234219 onClick = { handleSubmit }
235220 disabled = { isLoading }
236- className = "w-full bg-black text-white rounded-lg px-4 py-3 font-semibold hover:bg-gray-800 transition-all disabled:opacity-50 disabled:cursor-not-allowed"
221+ className = "w-full bg-black text-white rounded-lg px-3 sm:px- 4 py-2.5 sm:py-3 text-sm sm:text-base font-semibold hover:bg-gray-800 transition-all disabled:opacity-50 disabled:cursor-not-allowed"
237222 >
238- { isLoading ? (
239- < div className = "flex items-center justify-center space-x-2" >
240- < div className = "w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin" > </ div >
241- < span > { 'Signing in...' } </ span >
242- </ div >
243- ) : (
244- 'Sign in'
245- ) }
223+ { /* Button content */ }
246224 </ button >
247225 </ div >
248226
249-
250- < div className = "text-center mt-6" >
251- < p className = "text-gray-600" >
227+ < div className = "text-center mt-4 sm:mt-6" > { /* Responsive margin */ }
228+ < p className = "text-sm sm:text-base text-gray-600" > { /* Responsive text */ }
252229 { "Don't have an account? " }
253230 < button
254231 onClick = { ( ) => navigate ( "/Signup" ) }
0 commit comments