Files
ERP/frontend/src/components/EmptyState.tsx
T

22 lines
548 B
TypeScript

import type { LucideIcon } from "lucide-react";
export interface EmptyStateProps {
icon?: LucideIcon;
emoji?: string; // سازگاری با استفاده‌های قبلی
text: string;
}
// حالت خالی
export function EmptyState({ icon: Icon, emoji, text }: EmptyStateProps) {
return (
<div className="empty">
{Icon ? (
<Icon className="mx-auto mb-2 h-10 w-10 text-muted/60" strokeWidth={1.5} />
) : (
emoji && <div className="big">{emoji}</div>
)}
<div>{text}</div>
</div>
);
}