27 lines
624 B
TypeScript
Executable File
27 lines
624 B
TypeScript
Executable File
import { ReactNode } from "react";
|
|
|
|
interface EmptyStateProps {
|
|
icon?: ReactNode;
|
|
title: string;
|
|
description?: string;
|
|
action?: ReactNode;
|
|
}
|
|
|
|
export function EmptyState({
|
|
icon,
|
|
title,
|
|
description,
|
|
action,
|
|
}: EmptyStateProps) {
|
|
return (
|
|
<div className="flex flex-col items-center justify-center p-8 text-center border rounded-lg bg-gray-50">
|
|
{icon}
|
|
<h3 className="mt-2 text-lg font-medium text-gray-900">{title}</h3>
|
|
{description && (
|
|
<p className="mt-1 text-sm text-gray-500">{description}</p>
|
|
)}
|
|
{action && <div className="mt-6">{action}</div>}
|
|
</div>
|
|
);
|
|
}
|