File size: 976 Bytes
fff5af9 | 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 | import type { ReactNode } from "react";
import Icon from "@/components/Icon";
import { cn } from "@/lib/utils";
export default function EmptyState({
icon = "search",
title,
description,
children,
className,
}: {
icon?: string;
title: string;
description?: string;
children?: ReactNode;
className?: string;
}) {
return (
<div className={cn("flex flex-col items-center px-6 py-16 text-center", className)}>
<div className="flex h-16 w-16 items-center justify-center rounded-2xl bg-brand-500/10 text-brand-500">
<Icon name={icon} className="h-8 w-8" />
</div>
<h3 className="mt-4 text-lg font-semibold text-slate-900 dark:text-[#e8eaed]">{title}</h3>
{description && (
<p className="mt-1.5 max-w-md text-sm leading-relaxed text-slate-500 dark:text-[#8b92a1]">{description}</p>
)}
{children && <div className="mt-5 flex flex-wrap items-center justify-center gap-2">{children}</div>}
</div>
);
}
|