ExplorerEmpty.jsx 895 B

123456789101112131415161718192021222324252627282930313233
  1. import React from "react";
  2. import Link from "next/link";
  3. import { Inbox } from "lucide-react";
  4. import { Button } from "@/components/ui/button";
  5. /**
  6. * ExplorerEmpty
  7. *
  8. * Friendly empty state with an optional "go up" action.
  9. *
  10. * @param {{
  11. * title: string,
  12. * description: string,
  13. * upHref?: string|null
  14. * }} props
  15. */
  16. export default function ExplorerEmpty({ title, description, upHref = null }) {
  17. return (
  18. <div className="flex flex-col items-center justify-center gap-2 py-10 text-center">
  19. <Inbox className="h-6 w-6 text-muted-foreground" aria-hidden="true" />
  20. <div className="space-y-1">
  21. <p className="text-sm font-medium">{title}</p>
  22. <p className="text-sm text-muted-foreground">{description}</p>
  23. </div>
  24. {upHref ? (
  25. <Button variant="outline" size="sm" asChild>
  26. <Link href={upHref}>Eine Ebene höher</Link>
  27. </Button>
  28. ) : null}
  29. </div>
  30. );
  31. }