From e488bd9ea6b813785c0492bece9eb3ea10270369 Mon Sep 17 00:00:00 2001 From: peintnermax Date: Mon, 12 Aug 2024 12:19:24 +0200 Subject: [PATCH 01/10] fix: use branding colors across packages --- .../src/components/SignInWithAzureAD.tsx | 23 ++++--------------- .../src/components/SignInWithGithub.tsx | 13 +++-------- .../src/components/SignInWithGitlab.tsx | 20 ++++------------ .../src/components/SignInWithGoogle.tsx | 20 ++++------------ 4 files changed, 15 insertions(+), 61 deletions(-) diff --git a/packages/zitadel-react/src/components/SignInWithAzureAD.tsx b/packages/zitadel-react/src/components/SignInWithAzureAD.tsx index d9f7859bcfd..f30bd58e540 100644 --- a/packages/zitadel-react/src/components/SignInWithAzureAD.tsx +++ b/packages/zitadel-react/src/components/SignInWithAzureAD.tsx @@ -3,38 +3,23 @@ import { ReactNode, forwardRef } from "react"; import { SignInWithIdentityProviderProps } from "./SignInWith"; -export const SignInWithAzureAD = forwardRef< - HTMLButtonElement, - SignInWithIdentityProviderProps ->( +export const SignInWithAzureAD = forwardRef( ({ children, className = "", name = "", ...props }, ref): ReactNode => ( ), ); diff --git a/packages/zitadel-react/src/components/SignInWithGithub.tsx b/packages/zitadel-react/src/components/SignInWithGithub.tsx index d04f9b5fc0c..28a19829235 100644 --- a/packages/zitadel-react/src/components/SignInWithGithub.tsx +++ b/packages/zitadel-react/src/components/SignInWithGithub.tsx @@ -3,15 +3,12 @@ import { ReactNode, forwardRef } from "react"; import { SignInWithIdentityProviderProps } from "./SignInWith"; -export const SignInWithGithub = forwardRef< - HTMLButtonElement, - SignInWithIdentityProviderProps ->( +export const SignInWithGithub = forwardRef( ({ children, className = "", name = "", ...props }, ref): ReactNode => ( ), ); diff --git a/packages/zitadel-react/src/components/SignInWithGitlab.tsx b/packages/zitadel-react/src/components/SignInWithGitlab.tsx index 62b4d04c343..6ec0941f871 100644 --- a/packages/zitadel-react/src/components/SignInWithGitlab.tsx +++ b/packages/zitadel-react/src/components/SignInWithGitlab.tsx @@ -1,24 +1,16 @@ import { ReactNode, forwardRef } from "react"; import { SignInWithIdentityProviderProps } from "./SignInWith"; -export const SignInWithGitlab = forwardRef< - HTMLButtonElement, - SignInWithIdentityProviderProps ->( +export const SignInWithGitlab = forwardRef( ({ children, className = "", name = "", ...props }, ref): ReactNode => ( ), ); diff --git a/packages/zitadel-react/src/components/SignInWithGoogle.tsx b/packages/zitadel-react/src/components/SignInWithGoogle.tsx index e3dc0c85965..d3d9d0f8b7d 100644 --- a/packages/zitadel-react/src/components/SignInWithGoogle.tsx +++ b/packages/zitadel-react/src/components/SignInWithGoogle.tsx @@ -1,24 +1,16 @@ import { ReactNode, forwardRef } from "react"; import { SignInWithIdentityProviderProps } from "./SignInWith"; -export const SignInWithGoogle = forwardRef< - HTMLButtonElement, - SignInWithIdentityProviderProps ->( +export const SignInWithGoogle = forwardRef( ({ children, className = "", name = "", ...props }, ref): ReactNode => ( ), ); From 222f141e992cbb2a9261962405398983cc68eb0a Mon Sep 17 00:00:00 2001 From: peintnermax Date: Tue, 13 Aug 2024 10:14:42 +0200 Subject: [PATCH 02/10] fix: use login app namespace for component theming --- .../zitadel-react/src/components/SignInWithAzureAD.tsx | 8 ++------ .../zitadel-react/src/components/SignInWithGithub.tsx | 8 ++------ .../zitadel-react/src/components/SignInWithGitlab.tsx | 8 ++------ .../zitadel-react/src/components/SignInWithGoogle.tsx | 8 ++------ packages/zitadel-react/src/components/classes.ts | 2 ++ 5 files changed, 10 insertions(+), 24 deletions(-) create mode 100644 packages/zitadel-react/src/components/classes.ts diff --git a/packages/zitadel-react/src/components/SignInWithAzureAD.tsx b/packages/zitadel-react/src/components/SignInWithAzureAD.tsx index f30bd58e540..38acc645912 100644 --- a/packages/zitadel-react/src/components/SignInWithAzureAD.tsx +++ b/packages/zitadel-react/src/components/SignInWithAzureAD.tsx @@ -2,15 +2,11 @@ import { ReactNode, forwardRef } from "react"; import { SignInWithIdentityProviderProps } from "./SignInWith"; +import { IdpButtonClasses } from "./classes"; export const SignInWithAzureAD = forwardRef( ({ children, className = "", name = "", ...props }, ref): ReactNode => ( -