writekit/frontends/studio/src/components/shared/EmptyState.tsx

25 lines
690 B
TypeScript
Raw Normal View History

2026-01-09 00:16:46 +02:00
import type { ReactNode } from 'react'
import type { IconComponent } from './Icons'
interface EmptyStateProps {
Icon: IconComponent
title: string
description?: string
action?: ReactNode
}
export function EmptyState({ Icon, title, description, action }: EmptyStateProps) {
return (
<div className="card text-center py-12">
<div className="w-16 h-16 mx-auto mb-4 bg-border flex items-center justify-center">
<Icon className="text-muted text-2xl" />
</div>
<h3 className="text-sm font-medium text-text mb-1">{title}</h3>
{description && (
<p className="text-xs text-muted mb-4">{description}</p>
)}
{action}
</div>
)
}