Spaces:
Build error
Build error
File size: 1,351 Bytes
75fefa7 |
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
"use client";
import React from "react";
import { cn } from "@/utils/cn";
import { AsciiExplosion } from "@/components/shared/effects/flame";
interface EmptyStateProps {
title?: string;
description?: string;
icon?: React.ReactNode;
action?: React.ReactNode;
showFlame?: boolean;
className?: string;
}
export function EmptyState({
title = "No data yet",
description,
icon,
action,
showFlame = true,
className,
}: EmptyStateProps) {
return (
<div
className={cn(
"relative flex flex-col items-center justify-center py-12 px-4 text-center",
"min-h-[300px]",
className,
)}
>
{/* Subtle flame background */}
{showFlame && (
<div className="absolute inset-0 opacity-5">
<AsciiExplosion />
</div>
)}
<div className="relative z-10 space-y-4">
{icon && (
<div className="w-12 h-12 mx-auto text-black-alpha-40">{icon}</div>
)}
<div className="space-y-2">
<h3 className="text-label-large text-black-alpha-72">{title}</h3>
{description && (
<p className="text-body-medium text-black-alpha-56 max-w-md mx-auto">
{description}
</p>
)}
</div>
{action && <div className="pt-2">{action}</div>}
</div>
</div>
);
}
|