Files
solution-erp/fe-admin/src/components/EmptyState.tsx
pqhuy1987 2e43799046
Some checks failed
Deploy SOLUTION_ERP / build-deploy (push) Has been cancelled
[CLAUDE] FE: EmptyState component + MyContracts CTA empty state
2026-04-21 15:13:43 +07:00

30 lines
813 B
TypeScript

import type { ReactNode } from 'react'
import { cn } from '@/lib/cn'
export function EmptyState({
icon: Icon,
title,
description,
action,
className,
}: {
icon?: React.ComponentType<{ className?: string }>
title: ReactNode
description?: ReactNode
action?: ReactNode
className?: string
}) {
return (
<div className={cn('flex flex-col items-center justify-center gap-2 py-10 text-center', className)}>
{Icon && (
<div className="rounded-full bg-slate-100 p-3 text-slate-400">
<Icon className="h-6 w-6" />
</div>
)}
<div className="text-sm font-medium text-slate-700">{title}</div>
{description && <div className="max-w-sm text-xs text-slate-400">{description}</div>}
{action && <div className="mt-2">{action}</div>}
</div>
)
}