MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / OAuthSignInButton

Function OAuthSignInButton

packages/react/src/plugins/oauth-sign-in.tsx:490–514  ·  view source on GitHub ↗
(props: {
  readonly busy: boolean;
  readonly error: string | null;
  readonly isConnected: boolean;
  readonly onSignIn: () => void;
  readonly reconnectingLabel?: string;
  readonly signingInLabel?: string;
  readonly reconnectLabel?: string;
  readonly signInLabel?: string;
})

Source from the content-addressed store, hash-verified

488}
489
490export function OAuthSignInButton(props: {
491 readonly busy: boolean;
492 readonly error: string | null;
493 readonly isConnected: boolean;
494 readonly onSignIn: () => void;
495 readonly reconnectingLabel?: string;
496 readonly signingInLabel?: string;
497 readonly reconnectLabel?: string;
498 readonly signInLabel?: string;
499}) {
500 return (
501 <div className="flex items-center gap-2">
502 {props.error && <span className="text-xs text-destructive">{props.error}</span>}
503 <Button variant="outline" size="sm" onClick={props.onSignIn} disabled={props.busy}>
504 {props.busy
505 ? props.isConnected
506 ? (props.reconnectingLabel ?? "Reconnecting...")
507 : (props.signingInLabel ?? "Signing in...")
508 : props.isConnected
509 ? (props.reconnectLabel ?? "Reconnect")
510 : (props.signInLabel ?? "Sign in")}
511 </Button>
512 </div>
513 );
514}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected