Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
1.1 kB · 39 lines
TSX
12345678910111213141516171819202122232425262728293031323334353637383940"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 trigger={ <ActionButton secondary icon={<AccountSmall />} label="Sign In" /> } > <LoginForm text="Save your Leaflets and access them on multiple devices!" /> </Popover> );}