27 lines
640 B
TypeScript
27 lines
640 B
TypeScript
import type { LucideIcon } from "lucide-react";
|
|||
|
|
|
||
|
|
interface EmptyStateProps {
|
||
|
|
icon: LucideIcon;
|
||
|
|
title: string;
|
||
|
|
description?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Consistent empty state for data-fetching pages.
|
||
|
|
*/
|
||
|
|
export function EmptyState({
|
||
|
|
icon: Icon,
|
||
|
|
title,
|
||
|
|
description,
|
||
|
|
}: EmptyStateProps) {
|
||
|
|
return (
|
||
|
|
<div className="flex flex-col items-center justify-center py-20 text-center">
|
||
|
|
<Icon className="size-10 text-muted-foreground/40 mb-3" />
|
||
|
|
<p className="text-sm text-muted-foreground">{title}</p>
|
||
|
|
{description && (
|
||
|
|
<p className="text-xs text-muted-foreground/60 mt-1">{description}</p>
|
||
|
|
)}
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|