import Button from "@moduletrace/twui/layout/Button"; import Img from "@moduletrace/twui/layout/Img"; import Row from "@moduletrace/twui/layout/Row"; import Span from "@moduletrace/twui/layout/Span"; import type useFormInit from "@/src/hooks/use-form-init"; import { twMerge } from "tailwind-merge"; import useGoogleAuth from "@/src/hooks/use-google-auth"; type Props = Pick< ReturnType, "loading" | "setLoading" | "setStatus" >; /** * Themed button with Google's own (transparent) button laid over it. Once * Google's button is ready it takes keyboard focus and clicks, and the * themed button below is hidden from assistive tech. */ export default function GoogleAuthButton({ loading, setLoading, setStatus, }: Props) { const { handleButtonClick, googleButtonRef, googleReady } = useGoogleAuth({ loading, setLoading, setStatus, }); const overlayActive = googleReady && !loading; const label = "Log in with Google"; return (
); }