Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
1.1 kB · 41 lines
TSX
123456789101112131415161718192021222324252627282930313233343536373839404142"use client";import { useIdentityData } from "./IdentityProvider";import { Popover } from "./Popover";import LoginForm from "app/login/LoginForm";import { ButtonPrimary } from "./Buttons";import { ActionButton } from "./ActionBar/ActionButton";import { AccountSmall } from "./Icons/AccountSmall";
export function LoginButton() { let identityData = useIdentityData(); if (identityData.identity) return null; return ( <Popover asChild trigger={ <ButtonPrimary className="place-self-start text-sm"> Log In! </ButtonPrimary> } > <LoginForm text="Save your Leaflets and access them on multiple devices!" /> </Popover> );}
export function LoginActionButton() { let identityData = useIdentityData(); if (identityData.identity) return null; return ( <Popover asChild align="start" side="right" trigger={ <ActionButton secondary icon={<AccountSmall />} label="Sign In" /> } > <LoginForm text="Save your Leaflets and access them on multiple devices!" /> </Popover> );}