File size: 1,248 Bytes
65d68f5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"use client";

import { cn } from "@/lib/utils";

// =============================================================================
// EmptyState — Centered placeholder for empty content areas
// =============================================================================

export interface CleanEmptyStateProps {
  icon?: React.ReactNode;
  title: string;
  description?: string;
  action?: React.ReactNode;
  className?: string;
}

export function CleanEmptyState({ icon, title, description, action, className }: CleanEmptyStateProps) {
  return (
    <div
      className={cn(
        "flex flex-col items-center justify-center rounded-xl border border-dashed border-[#E5E7EB] bg-[#FAFAFA] px-6 py-12 text-center",
        className,
      )}
    >
      {icon && (
        <div className="mb-3 flex size-12 items-center justify-center rounded-xl bg-[#F3F4F6] text-[#9CA3AF]">
          <span className="[&>svg]:size-5">{icon}</span>
        </div>
      )}
      <h3 className="text-[14px] font-semibold text-[#374151]">{title}</h3>
      {description && (
        <p className="mt-1 max-w-[320px] text-[13px] leading-relaxed text-[#9CA3AF]">{description}</p>
      )}
      {action && <div className="mt-4">{action}</div>}
    </div>
  );
}