● Zion Boggan
repos/Drophawk/frontend/components/shared/EmptyState.tsx
zionboggan.com ↗
37 lines · tsx
History for this file →
1
import type { LucideIcon } from "lucide-react";
2
import { cn } from "@/lib/utils";
3
 
4
export function EmptyState({
5
  icon: Icon,
6
  title,
7
  description,
8
  action,
9
  className,
10
}: {
11
  icon: LucideIcon;
12
  title: string;
13
  description?: string;
14
  action?: React.ReactNode;
15
  className?: string;
16
}) {
17
  return (
18
    <div
19
      className={cn(
20
        "flex flex-col items-center justify-center gap-3 rounded-[var(--radius-lg)]",
21
        "border border-dashed border-[var(--color-border-subtle)] px-6 py-12 text-center",
22
        className,
23
      )}
24
    >
25
      <div className="grid h-12 w-12 place-items-center rounded-full bg-[var(--color-accent-teal-soft)] text-[var(--color-accent-teal)]">
26
        <Icon className="h-5 w-5" aria-hidden />
27
      </div>
28
      <div className="space-y-1">
29
        <p className="text-sm font-semibold text-[var(--color-fg-primary)]">{title}</p>
30
        {description ? (
31
          <p className="mx-auto max-w-sm text-xs text-[var(--color-fg-tertiary)]">{description}</p>
32
        ) : null}
33
      </div>
34
      {action}
35
    </div>
36
  );
37
}