File size: 2,145 Bytes
11c0af1
 
 
 
 
1a22539
 
11c0af1
 
1a22539
11c0af1
 
 
 
1a22539
11c0af1
1a22539
11c0af1
 
 
 
 
 
 
1a22539
11c0af1
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
export default function GoogleButton({ label }: { label: string }) {
  return (
    <a
      href="/api/auth/google"
      className="group relative flex items-center justify-center gap-3 w-full px-4 py-3 rounded-xl
        bg-transparent hover:bg-white/5 text-white font-semibold text-sm
        border border-surface-500/30 hover:border-primary-400/50
        transition-all duration-500 ease-[cubic-bezier(0.34,1.56,0.64,1)]
        shadow-[0_1px_3px_rgba(0,0,0,0.08),0_1px_2px_rgba(0,0,0,0.06)]
        hover:shadow-[0_10px_40px_rgba(66,133,244,0.12),0_4px_12px_rgba(0,0,0,0.1)]
        active:scale-[0.97] active:shadow-[0_2px_8px_rgba(66,133,244,0.1)] active:duration-75
        focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 focus:ring-offset-surface-900
        overflow-hidden"
    >
      <span className="absolute inset-0 w-1/2 h-full bg-gradient-to-r from-transparent via-white/10 to-transparent
        -skew-x-12 -translate-x-full group-hover:translate-x-[200%] transition-transform duration-700 ease-in-out pointer-events-none" />
      <span className="relative flex items-center justify-center w-5 h-5 group-hover:animate-google-wiggle opacity-80 group-hover:opacity-100 transition-opacity duration-300">
        <svg viewBox="0 0 24 24" className="w-5 h-5" aria-hidden="true">
          <path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" fill="#4285F4" />
          <path 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" fill="#34A853" />
          <path 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" fill="#FBBC05" />
          <path 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" fill="#EA4335" />
        </svg>
      </span>
      <span className="relative text-surface-200 group-hover:text-white transition-colors duration-300">{label}</span>
    </a>
  );
}