29 lines
681 B
TypeScript
29 lines
681 B
TypeScript
import { Home, RefreshCw } from 'lucide-react';
|
|
import { Box } from './Box';
|
|
import { Button } from './Button';
|
|
|
|
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>
|
|
);
|
|
};
|