mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 19:20:39 +09:00
24 lines
690 B
TypeScript
24 lines
690 B
TypeScript
|
|
import type { LucideIcon } from "lucide-react";
|
||
|
|
import { Button } from "@/components/ui/button";
|
||
|
|
|
||
|
|
interface EmptyStateProps {
|
||
|
|
icon: LucideIcon;
|
||
|
|
message: string;
|
||
|
|
action?: string;
|
||
|
|
onAction?: () => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function EmptyState({ icon: Icon, message, action, onAction }: EmptyStateProps) {
|
||
|
|
return (
|
||
|
|
<div className="flex flex-col items-center justify-center py-16 text-center">
|
||
|
|
<Icon className="h-12 w-12 text-muted-foreground/50 mb-4" />
|
||
|
|
<p className="text-sm text-muted-foreground mb-4">{message}</p>
|
||
|
|
{action && onAction && (
|
||
|
|
<Button variant="outline" size="sm" onClick={onAction}>
|
||
|
|
{action}
|
||
|
|
</Button>
|
||
|
|
)}
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|