Files
zitadel/packages/zitadel-react/src/components/SignInWithAzureAD.tsx

24 lines
1.1 KiB
TypeScript
Raw Normal View History

"use client";
2023-07-18 13:58:33 +02:00
import { ReactNode, forwardRef } from "react";
import { SignInWithIdentityProviderProps } from "./SignInWith";
import { IdpButtonClasses } from "./classes";
2023-07-18 13:58:33 +02:00
export const SignInWithAzureAD = forwardRef<HTMLButtonElement, SignInWithIdentityProviderProps>(
({ children, className = "", name = "", ...props }, ref): ReactNode => (
<button type="button" ref={ref} className={`${IdpButtonClasses} ${className}`} {...props}>
2023-07-31 11:56:23 +02:00
<div className="ztdl-h-12 ztdl-p-[10px] ztdl-w-12 ztdl-flex ztdl-items-center ztdl-justify-center">
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="21" viewBox="0 0 21 21" className="w-full h-full">
2023-07-31 11:56:23 +02:00
<path fill="#f25022" d="M1 1H10V10H1z"></path>
<path fill="#00a4ef" d="M1 11H10V20H1z"></path>
<path fill="#7fba00" d="M11 1H20V10H11z"></path>
<path fill="#ffb900" d="M11 11H20V20H11z"></path>
2023-07-18 13:58:33 +02:00
</svg>
</div>
{children ? children : <span className="ztdl-ml-4">{name ? name : "Sign in with AzureAD"}</span>}
</button>
2024-05-24 10:40:12 -04:00
),
);
2023-07-18 13:58:33 +02:00
SignInWithAzureAD.displayName = "SignInWithAzureAD";