ScanMenu / src /components /ui /empty-state.tsx
HamzaAri's picture
๐Ÿš€ Deploy ScanMenu - Production-ready SaaS web app for digital restaurant menus & QR ordering
e1ef9fc verified
raw
history blame contribute delete
908 Bytes
import { LucideIcon } from 'lucide-react';
import { Button } from './button';
interface EmptyStateProps {
icon: LucideIcon;
title: string;
description: string;
action?: {
label: string;
onClick: () => void;
};
}
export function EmptyState({ icon: Icon, title, description, action }: EmptyStateProps) {
return (
<div className="flex flex-col items-center justify-center py-16 px-4">
<div className="rounded-2xl bg-zinc-100 p-4 dark:bg-zinc-800">
<Icon className="h-8 w-8 text-zinc-400" />
</div>
<h3 className="mt-4 text-lg font-semibold text-zinc-900 dark:text-zinc-100">{title}</h3>
<p className="mt-2 max-w-sm text-center text-sm text-zinc-500 dark:text-zinc-400">{description}</p>
{action && (
<Button variant="primary" className="mt-6" onClick={action.onClick}>
{action.label}
</Button>
)}
</div>
);
}