Files
myeasycms-v2/packages/features/auth/src/components/auth-provider-button.tsx
giancarlo bce3479368 Cleanup
2024-03-24 02:23:22 +08:00

27 lines
583 B
TypeScript

import { Button } from '@kit/ui/button';
import { OauthProviderLogoImage } from './oauth-provider-logo-image';
export function AuthProviderButton({
providerId,
onClick,
children,
}: React.PropsWithChildren<{
providerId: string;
onClick: () => void;
}>) {
return (
<Button
className={'flex w-full space-x-2 text-center'}
data-provider={providerId}
data-test={'auth-provider-button'}
variant={'outline'}
onClick={onClick}
>
<OauthProviderLogoImage providerId={providerId} />
<span>{children}</span>
</Button>
);
}