Files
gridpilot.gg/apps/website/ui/ErrorActionButtons.tsx
2026-01-18 21:31:08 +01:00

30 lines
719 B
TypeScript

import React from 'react';
import { Box } from './primitives/Box';
import { Button } from './Button';
import { RefreshCw, Home } from 'lucide-react';
export interface ErrorActionButtonsProps {
onRetry?: () => void;
onGoHome?: () => void;
}
export const ErrorActionButtons = ({
onRetry,
onGoHome
}: ErrorActionButtonsProps) => {
return (
<Box display="flex" alignItems="center" gap={4}>
{onRetry && (
<Button variant="primary" onClick={onRetry} icon={<RefreshCw size={16} />}>
Retry
</Button>
)}
{onGoHome && (
<Button variant="secondary" onClick={onGoHome} icon={<Home size={16} />}>
Go Home
</Button>
)}
</Box>
);
};