28 lines
766 B
TypeScript
28 lines
766 B
TypeScript
interface EmptyStateProps {
|
|
emoji: string
|
|
title: string
|
|
description?: string
|
|
action?: {
|
|
label: string
|
|
onClick: () => void
|
|
}
|
|
}
|
|
|
|
export default function EmptyState({ emoji, title, description, action }: EmptyStateProps) {
|
|
return (
|
|
<div className="text-center py-12 text-gray-400">
|
|
<div className="text-6xl mb-4">{emoji}</div>
|
|
<h3 className="text-xl font-semibold text-white mb-2">{title}</h3>
|
|
{description && <p className="text-sm mb-4">{description}</p>}
|
|
{action && (
|
|
<button
|
|
onClick={action.onClick}
|
|
className="mt-4 px-6 py-2 bg-celo-green text-black rounded-lg font-semibold hover:bg-celo-green/90 transition"
|
|
>
|
|
{action.label}
|
|
</button>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|