tahamajs/IE / Projects /front /src /components /project /ErrorMessage.tsx
tahamajs's picture
download
raw
1 kB
import { AlertCircle } from "lucide-react";
interface ErrorMessageProps {
title?: string;
message: string;
action?: {
label: string;
onClick: () => void;
};
}
export function ErrorMessage({ title = "Error", message, action }: ErrorMessageProps) {
return (
<div className="flex flex-col items-center justify-center min-h-[60vh] text-center">
<div className="w-16 h-16 rounded-full bg-red-100 dark:bg-red-900/20 flex items-center justify-center mb-4">
<AlertCircle className="w-8 h-8 text-red-500" />
</div>
<h2 className="text-xl font-semibold text-gray-900 dark:text-white mb-2">
{title}
</h2>
<p className="text-gray-500 dark:text-gray-400 mb-6 max-w-md">
{message}
</p>
{action && (
<button
onClick={action.onClick}
className="px-4 py-2 rounded-lg bg-primary text-white hover:bg-primary/90 transition"
>
{action.label}
</button>
)}
</div>
);
}

Xet Storage Details

Size:
1 kB
·
Xet hash:
a1f86a6fd6819f81ac4463f71f45abe7dea9a930303e4fd6e00cc99ca8097cbd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.