|
1 | 1 | 'use client' |
2 | 2 |
|
3 | 3 | import { useEffect, useState } from 'react' |
4 | | -import { Eye, EyeOff } from 'lucide-react' |
| 4 | +import { ArrowRight, ChevronRight, Eye, EyeOff } from 'lucide-react' |
5 | 5 | import Link from 'next/link' |
6 | 6 | import { useRouter, useSearchParams } from 'next/navigation' |
7 | 7 | import { Button } from '@/components/ui/button' |
@@ -106,13 +106,15 @@ export default function LoginPage({ |
106 | 106 | const [passwordErrors, setPasswordErrors] = useState<string[]>([]) |
107 | 107 | const [showValidationError, setShowValidationError] = useState(false) |
108 | 108 | const [buttonClass, setButtonClass] = useState('auth-button-gradient') |
| 109 | + const [isButtonHovered, setIsButtonHovered] = useState(false) |
109 | 110 |
|
110 | 111 | const [callbackUrl, setCallbackUrl] = useState('/workspace') |
111 | 112 | const [isInviteFlow, setIsInviteFlow] = useState(false) |
112 | 113 |
|
113 | 114 | const [forgotPasswordOpen, setForgotPasswordOpen] = useState(false) |
114 | 115 | const [forgotPasswordEmail, setForgotPasswordEmail] = useState('') |
115 | 116 | const [isSubmittingReset, setIsSubmittingReset] = useState(false) |
| 117 | + const [isResetButtonHovered, setIsResetButtonHovered] = useState(false) |
116 | 118 | const [resetStatus, setResetStatus] = useState<{ |
117 | 119 | type: 'success' | 'error' | null |
118 | 120 | message: string |
@@ -482,10 +484,21 @@ export default function LoginPage({ |
482 | 484 |
|
483 | 485 | <Button |
484 | 486 | type='submit' |
485 | | - className={`${buttonClass} flex w-full items-center justify-center gap-2 rounded-[10px] border font-medium text-[15px] text-white transition-all duration-200`} |
| 487 | + onMouseEnter={() => setIsButtonHovered(true)} |
| 488 | + onMouseLeave={() => setIsButtonHovered(false)} |
| 489 | + className='group inline-flex w-full items-center justify-center gap-2 rounded-[10px] border border-[#6F3DFA] bg-gradient-to-b from-[#8357FF] to-[#6F3DFA] py-[6px] pr-[10px] pl-[12px] text-[15px] text-white shadow-[inset_0_2px_4px_0_#9B77FF] transition-all' |
486 | 490 | disabled={isLoading} |
487 | 491 | > |
488 | | - {isLoading ? 'Signing in...' : 'Sign in'} |
| 492 | + <span className='flex items-center gap-1'> |
| 493 | + {isLoading ? 'Signing in...' : 'Sign in'} |
| 494 | + <span className='inline-flex transition-transform duration-200 group-hover:translate-x-0.5'> |
| 495 | + {isButtonHovered ? ( |
| 496 | + <ArrowRight className='h-4 w-4' aria-hidden='true' /> |
| 497 | + ) : ( |
| 498 | + <ChevronRight className='h-4 w-4' aria-hidden='true' /> |
| 499 | + )} |
| 500 | + </span> |
| 501 | + </span> |
489 | 502 | </Button> |
490 | 503 | </form> |
491 | 504 | )} |
@@ -600,10 +613,21 @@ export default function LoginPage({ |
600 | 613 | <Button |
601 | 614 | type='button' |
602 | 615 | onClick={handleForgotPassword} |
603 | | - className={`${buttonClass} w-full rounded-[10px] border font-medium text-[15px] text-white transition-all duration-200`} |
| 616 | + onMouseEnter={() => setIsResetButtonHovered(true)} |
| 617 | + onMouseLeave={() => setIsResetButtonHovered(false)} |
| 618 | + className='group inline-flex w-full items-center justify-center gap-2 rounded-[10px] border border-[#6F3DFA] bg-gradient-to-b from-[#8357FF] to-[#6F3DFA] py-[6px] pr-[10px] pl-[12px] text-[15px] text-white shadow-[inset_0_2px_4px_0_#9B77FF] transition-all' |
604 | 619 | disabled={isSubmittingReset} |
605 | 620 | > |
606 | | - {isSubmittingReset ? 'Sending...' : 'Send Reset Link'} |
| 621 | + <span className='flex items-center gap-1'> |
| 622 | + {isSubmittingReset ? 'Sending...' : 'Send Reset Link'} |
| 623 | + <span className='inline-flex transition-transform duration-200 group-hover:translate-x-0.5'> |
| 624 | + {isResetButtonHovered ? ( |
| 625 | + <ArrowRight className='h-4 w-4' aria-hidden='true' /> |
| 626 | + ) : ( |
| 627 | + <ChevronRight className='h-4 w-4' aria-hidden='true' /> |
| 628 | + )} |
| 629 | + </span> |
| 630 | + </span> |
607 | 631 | </Button> |
608 | 632 | </div> |
609 | 633 | </DialogContent> |
|
0 commit comments