| 1234567891011121314151617181920212223242526272829 |
- import type { LucideIcon } from "lucide-react";
- import { Button } from "@/components/ui/button";
- export function EmptyState({
- icon: Icon,
- title,
- description,
- actionLabel,
- onAction,
- }: {
- icon: LucideIcon;
- title: string;
- description: string;
- actionLabel?: string;
- onAction?: () => void;
- }) {
- return (
- <div className="flex min-h-64 flex-col items-center justify-center rounded-md border border-dashed border-border bg-muted/30 p-8 text-center">
- <Icon className="h-9 w-9 text-muted-foreground" />
- <h3 className="mt-4 text-base font-semibold">{title}</h3>
- <p className="mt-2 max-w-md text-sm text-muted-foreground">{description}</p>
- {actionLabel && onAction ? (
- <Button className="mt-5" onClick={onAction}>
- {actionLabel}
- </Button>
- ) : null}
- </div>
- );
- }
|