2023-07-27 15:54:34 +02:00
|
|
|
"use client";
|
2023-07-18 13:58:33 +02:00
|
|
|
|
2023-07-27 15:54:34 +02:00
|
|
|
import { ReactNode, forwardRef } from "react";
|
|
|
|
|
import { SignInWithIdentityProviderProps } from "./SignInWith";
|
2024-08-13 10:14:42 +02:00
|
|
|
import { IdpButtonClasses } from "./classes";
|
2023-07-18 13:58:33 +02:00
|
|
|
|
2024-08-12 12:19:24 +02:00
|
|
|
export const SignInWithAzureAD = forwardRef<HTMLButtonElement, SignInWithIdentityProviderProps>(
|
2023-07-27 15:54:34 +02:00
|
|
|
({ children, className = "", name = "", ...props }, ref): ReactNode => (
|
2024-08-13 10:14:42 +02:00
|
|
|
<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">
|
2024-08-12 12:19:24 +02:00
|
|
|
<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>
|
2024-08-12 12:19:24 +02:00
|
|
|
{children ? children : <span className="ztdl-ml-4">{name ? name : "Sign in with AzureAD"}</span>}
|
2023-07-27 15:54:34 +02:00
|
|
|
</button>
|
2024-05-24 10:40:12 -04:00
|
|
|
),
|
2023-07-27 15:54:34 +02:00
|
|
|
);
|
2023-07-18 13:58:33 +02:00
|
|
|
|
|
|
|
|
SignInWithAzureAD.displayName = "SignInWithAzureAD";
|