mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
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:
@@ -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>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user