veza/apps/web/src/features/auth/components/OAuthButtons.tsx
senke 6974c12a25 aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 11:50:46 +01:00

83 lines
1.9 KiB
TypeScript

import { Button } from '@/components/ui/button';
import { Github, Chrome, MessageCircle } from 'lucide-react';
interface OAuthButtonsProps {
onGoogleClick?: () => void;
onGithubClick?: () => void;
onDiscordClick?: () => void;
disabled?: boolean;
}
export function OAuthButtons({
onGoogleClick,
onGithubClick,
onDiscordClick,
disabled = false,
}: OAuthButtonsProps) {
const handleGoogle = () => {
if (onGoogleClick) {
onGoogleClick();
} else {
window.location.href = '/api/v1/auth/oauth/google';
}
};
const handleGithub = () => {
if (onGithubClick) {
onGithubClick();
} else {
window.location.href = '/api/v1/auth/oauth/github';
}
};
const handleDiscord = () => {
if (onDiscordClick) {
onDiscordClick();
} else {
window.location.href = '/api/v1/auth/oauth/discord';
}
};
return (
<div className="space-y-4">
<div className="text-sm text-center text-kodo-content-dim mb-4">
Or continue with
</div>
<div className="grid gap-4">
<Button
type="button"
variant="outline"
onClick={handleGoogle}
disabled={disabled}
className="w-full"
>
<Chrome className="mr-2 h-4 w-4" />
Continue with Google
</Button>
<Button
type="button"
variant="outline"
onClick={handleGithub}
disabled={disabled}
className="w-full"
>
<Github className="mr-2 h-4 w-4" />
Continue with GitHub
</Button>
<Button
type="button"
variant="outline"
onClick={handleDiscord}
disabled={disabled}
className="w-full"
>
<MessageCircle className="mr-2 h-4 w-4" />
Continue with Discord
</Button>
</div>
</div>
);
}