fix(login): center text for generic IDP buttons without icons (#12211)

Closes #12182

# Which Problems Are Solved

Generic IDP buttons (OIDC, SAML, LDAP, JWT) used pl-20 to approximate
icon offset alignment, but since they have no icon, the text appeared
misaligned compared to branded IDPs (Google, Microsoft, Apple).

# How the Problems Are Solved

Replaced the left-padding hack with centered text so generic IDP names
display cleanly within the button.

before:

<img width="392" height="290" alt="Screenshot 2026-05-28 at 12 03 21"
src="https://github.com/user-attachments/assets/64c4e8eb-caec-4742-b61c-e3b0c5093dd7"
/>

after:

<img width="392" height="289" alt="Screenshot 2026-05-28 at 12 07 27"
src="https://github.com/user-attachments/assets/d1faf1f4-0aab-475f-8801-15b461e15da4"
/>
This commit is contained in:
Max Peintner
2026-06-22 08:57:18 +00:00
committed by GitHub
parent f691851d32
commit 239620f112
@@ -5,10 +5,10 @@ import { BaseButton, SignInWithIdentityProviderProps } from "./base-button";
export const SignInWithGeneric = forwardRef<HTMLButtonElement, SignInWithIdentityProviderProps>(
function SignInWithGeneric(props, ref) {
const { children, name = "", className = "h-[50px] pl-20", ...restProps } = props;
const { children, name = "", className = "h-[50px]", ...restProps } = props;
return (
<BaseButton {...restProps} ref={ref} className={className}>
{children ? children : <span>{name}</span>}
{children ? children : <span className="w-full text-center">{name}</span>}
</BaseButton>
);
},