24 lines
754 B
TypeScript
24 lines
754 B
TypeScript
interface EmptyStateProps {
|
|
icon?: React.ReactNode;
|
|
title: string;
|
|
description?: string;
|
|
action?: React.ReactNode;
|
|
}
|
|
|
|
export function EmptyState({ icon, title, description, action }: EmptyStateProps) {
|
|
return (
|
|
<div className="flex flex-col items-center justify-center py-12 text-center" role="status">
|
|
{icon && (
|
|
<div className="w-12 h-12 rounded-full bg-surface-100 flex items-center justify-center text-surface-400 mb-4">
|
|
{icon}
|
|
</div>
|
|
)}
|
|
<h3 className="text-sm font-semibold text-surface-700">{title}</h3>
|
|
{description && (
|
|
<p className="mt-1 text-sm text-surface-400 max-w-sm">{description}</p>
|
|
)}
|
|
{action && <div className="mt-4">{action}</div>}
|
|
</div>
|
|
);
|
|
}
|