veza/apps/web/src/features/auth/components/OAuthButton.tsx

31 lines
605 B
TypeScript
Raw Normal View History

import { AuthButton } from './AuthButton';
interface OAuthButtonProps {
provider: 'google' | 'github';
onClick: () => void;
}
export function OAuthButton({ provider, onClick }: OAuthButtonProps) {
const labels = {
google: 'Continuer avec Google',
github: 'Continuer avec GitHub',
};
const ariaLabels = {
google: 'Se connecter avec Google',
github: 'Se connecter avec GitHub',
};
return (
<AuthButton
variant="secondary"
onClick={onClick}
type="button"
aria-label={ariaLabels[provider]}
>
{labels[provider]}
</AuthButton>
);
}