2026-07-26 16:14:32 +07:00
|
|
|
import type { LucideIcon } from "lucide-react";
|
2026-07-28 11:41:09 +07:00
|
|
|
import { Inbox } from "lucide-react";
|
2026-08-01 09:19:39 +07:00
|
|
|
import { cn } from "@/lib/utils";
|
2026-07-26 16:14:32 +07:00
|
|
|
|
|
|
|
|
interface EmptyStateProps {
|
2026-07-28 11:41:09 +07:00
|
|
|
icon?: LucideIcon;
|
|
|
|
|
title?: string;
|
2026-07-26 16:14:32 +07:00
|
|
|
description?: string;
|
2026-08-01 09:19:39 +07:00
|
|
|
className?: string;
|
2026-07-26 16:14:32 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function EmptyState({
|
2026-07-28 11:41:09 +07:00
|
|
|
icon: Icon = Inbox,
|
|
|
|
|
title = "No data yet",
|
|
|
|
|
description = "Nothing to display here yet.",
|
2026-08-01 09:19:39 +07:00
|
|
|
className,
|
2026-07-26 16:14:32 +07:00
|
|
|
}: EmptyStateProps) {
|
|
|
|
|
return (
|
2026-08-14 10:49:44 +07:00
|
|
|
<div
|
2026-08-07 17:33:12 +07:00
|
|
|
className={cn(
|
2026-08-14 10:49:44 +07:00
|
|
|
"surface flex flex-col items-center gap-2 py-12 text-center",
|
2026-08-07 17:33:12 +07:00
|
|
|
className,
|
|
|
|
|
)}
|
2026-08-01 09:19:39 +07:00
|
|
|
>
|
2026-08-14 10:49:44 +07:00
|
|
|
<Icon className="size-8 text-[var(--color-ink-soft)]" />
|
|
|
|
|
<p className="text-sm font-medium text-[var(--color-ink)]">{title}</p>
|
|
|
|
|
<p className="text-xs text-[var(--color-ink-soft)]">{description}</p>
|
|
|
|
|
</div>
|
2026-07-26 16:14:32 +07:00
|
|
|
);
|
|
|
|
|
}
|