flwo / client /src /components /shared /EmptyState.jsx
moustafa7's picture
Initial commit
24727a3
Raw History Blame Contribute Delete
755 Bytes
import { cn } from '../../utils/cn'
import { Button } from '../ui/Button'
export function EmptyState({ icon: Icon, title, description, actionLabel, onAction, className }) {
return (
<div className={cn('flex flex-col items-center justify-center py-16 px-4 text-center', className)}>
{Icon && <div className="w-16 h-16 rounded-2xl bg-gray-100 flex items-center justify-center mb-4">
<Icon className="w-8 h-8 text-gray-400" />
</div>}
<h3 className="text-lg font-bold text-gray-900">{title}</h3>
{description && <p className="text-sm text-gray-500 mt-2 max-w-sm">{description}</p>}
{actionLabel && onAction && (
<Button className="mt-4" onClick={onAction}>{actionLabel}</Button>
)}
</div>
)
}