import { AlertTriangle, RefreshCw } from "lucide-react"; import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; interface ErrorCardProps { message?: string; onRetry?: () => void; className?: string; /** Render as a compact inline row instead of a full card */ inline?: boolean; } export function ErrorCard({ message = "Failed to load data.", onRetry, className, inline = false, }: ErrorCardProps) { if (inline) { return (
{message} {onRetry && ( )}
); } return (

Something went wrong

{message}

{onRetry && ( )}
); }