@@ -2,6 +2,7 @@ import { EnvelopeIcon } from "@heroicons/react/20/solid";
22import type { LoaderFunctionArgs , MetaFunction } from "@remix-run/node" ;
33import { Form } from "@remix-run/react" ;
44import { GitHubLightIcon } from "@trigger.dev/companyicons" ;
5+ import { motion , useReducedMotion } from "framer-motion" ;
56import { redirect , typedjson , useTypedLoaderData } from "remix-typedjson" ;
67import { LoginPageLayout } from "~/components/LoginPageLayout" ;
78import { Button , LinkButton } from "~/components/primitives/Buttons" ;
@@ -41,10 +42,22 @@ function GoogleIcon({ className }: { className?: string }) {
4142}
4243
4344function LastUsedBadge ( ) {
45+ const shouldReduceMotion = useReducedMotion ( ) ;
46+
4447 return (
45- < span className = "absolute -right-2 -top-2.5 z-10 rounded border border-charcoal-750 bg-charcoal-800 px-2 py-1 text-[11px] font-medium text-blue-400" >
46- Last used
47- </ span >
48+ < div className = "absolute -right-[4.6rem] top-1/2 z-10 -translate-y-1/2 shadow-md" >
49+ < motion . div
50+ className = "relative inline-flex flex-col items-center rounded border border-charcoal-700 bg-charcoal-800 px-2 py-1 text-center text-[10px] font-medium uppercase text-blue-500"
51+ initial = { shouldReduceMotion ? undefined : { opacity : 0 , x : 4 } }
52+ animate = { shouldReduceMotion ? undefined : { opacity : 1 , x : 0 } }
53+ transition = { shouldReduceMotion ? undefined : { duration : 0.8 , ease : "easeOut" } }
54+ >
55+ < span className = "pointer-events-none absolute left-0 top-1/2 -translate-x-1/2 -translate-y-1/2" >
56+ < span className = "block h-2 w-2 rotate-45 border-b border-l border-charcoal-700 bg-charcoal-800" />
57+ </ span >
58+ Last used
59+ </ motion . div >
60+ </ div >
4861 ) ;
4962}
5063
0 commit comments