MCPcopy Create free account
hub / github.com/dailydotdev/apps / SignBackButton

Function SignBackButton

packages/shared/src/components/auth/SignBackButton.tsx:15–50  ·  view source on GitHub ↗
({
  signBack,
  provider,
  disabled = false,
  onClick,
}: SignBackButtonProps)

Source from the content-addressed store, hash-verified

13}
14
15export function SignBackButton({
16 signBack,
17 provider,
18 disabled = false,
19 onClick,
20}: SignBackButtonProps): ReactElement {
21 const item = providerMap[provider.toLowerCase() as keyof typeof providerMap];
22
23 return (
24 <button
25 aria-busy={disabled}
26 className={`btn-signback btn-primary ${
27 disabled ? 'opacity-60 pointer-events-none' : ''
28 }`}
29 type="button"
30 disabled={disabled}
31 onClick={onClick}
32 aria-label={`Continue as ${
33 signBack.name || signBack.email
34 } from ${provider}`}
35 >
36 <ProfilePicture user={signBack} size={ProfileImageSize.Large} />
37 <div className="ml-2 flex flex-col items-start text-surface-invert">
38 {!!signBack.name && (
39 <span className="font-bold typo-callout">
40 Continue as {signBack.name.split(' ')[0]}
41 </span>
42 )}
43 <span className="typo-footnote">{signBack.email}</span>
44 </div>
45 <span className="ml-auto rounded-8 border border-border-subtlest-secondary p-1 text-surface-invert">
46 {item.icon}
47 </span>
48 </button>
49 );
50}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected