diff --git a/docs/superpowers/specs/2026-03-24-login-dialog-design.md b/docs/superpowers/specs/2026-03-24-login-dialog-design.md index 6191d6a..dd48753 100644 --- a/docs/superpowers/specs/2026-03-24-login-dialog-design.md +++ b/docs/superpowers/specs/2026-03-24-login-dialog-design.md @@ -21,7 +21,7 @@ interface LoginFormProps { logo?: ReactNode title?: string // Default: "Sign in" socialProviders?: SocialProvider[] // Omit or [] to hide social section + divider - onSubmit: (credentials: { email: string; password: string; remember: boolean }) => void + onSubmit?: (credentials: { email: string; password: string; remember: boolean }) => void // Omit to hide credentials section onForgotPassword?: () => void // Omit to hide link onSignUp?: () => void // Omit to hide "Don't have an account?" error?: string // Server-side error, rendered as Alert @@ -62,9 +62,9 @@ Social-first ordering, top to bottom: The form adapts automatically based on props: -- **Full** — social providers + credentials + all links -- **Credentials only** — no `socialProviders` passed, social section and divider hidden -- **Social only** — only `socialProviders` passed, credentials section hidden (make `onSubmit` optional for this case, or accept it will never fire) +- **Full** — `socialProviders` + `onSubmit` both provided. Social buttons, divider, and credentials all shown. +- **Credentials only** — `onSubmit` provided, no `socialProviders`. Social section and divider hidden. +- **Social only** — `socialProviders` provided, `onSubmit` omitted. Credentials section (email, password, remember me, submit button) and divider hidden. ## Validation