ExplorerError.jsx 859 B

123456789101112131415161718192021222324252627282930313233
  1. import React from "react";
  2. import { RefreshCw, TriangleAlert } from "lucide-react";
  3. import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert";
  4. import { Button } from "@/components/ui/button";
  5. /**
  6. * ExplorerError
  7. *
  8. * Generic error state with retry action.
  9. * All copy is German (user-facing).
  10. *
  11. * @param {{
  12. * title: string,
  13. * description: string,
  14. * onRetry: () => void
  15. * }} props
  16. */
  17. export default function ExplorerError({ title, description, onRetry }) {
  18. return (
  19. <div className="space-y-3">
  20. <Alert variant="destructive">
  21. <TriangleAlert className="h-4 w-4" />
  22. <AlertTitle>{title}</AlertTitle>
  23. <AlertDescription>{description}</AlertDescription>
  24. </Alert>
  25. <Button type="button" variant="outline" onClick={onRetry}>
  26. <RefreshCw className="h-4 w-4" />
  27. Erneut versuchen
  28. </Button>
  29. </div>
  30. );
  31. }