celo-poll/components/ui/EmptyState.tsx
2025-12-08 16:31:30 +03:00

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>
)
}