(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;
})
| 488 | } |
| 489 | |
| 490 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected