35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { FolderOpen, Plus } from "lucide-react";
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
interface EmptyStateProps {
|
|
title?: string;
|
|
description?: string;
|
|
actionLabel?: string;
|
|
onAction?: () => void;
|
|
}
|
|
|
|
export function EmptyState({
|
|
title = "No hay proyectos",
|
|
description = "Parece que aún no tienes ningún proyecto. Crea uno nuevo para empezar.",
|
|
actionLabel = "Crear proyecto",
|
|
onAction,
|
|
}: EmptyStateProps) {
|
|
return (
|
|
<div className="flex flex-col items-center justify-center rounded-lg border border-dashed p-8 text-center animate-in fade-in-50">
|
|
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-muted">
|
|
<FolderOpen className="h-6 w-6 text-muted-foreground" />
|
|
</div>
|
|
<h3 className="mt-4 text-lg font-semibold">{title}</h3>
|
|
<p className="mt-2 text-sm text-muted-foreground max-w-sm">
|
|
{description}
|
|
</p>
|
|
{onAction && (
|
|
<Button onClick={onAction} className="mt-4">
|
|
<Plus className="mr-2 h-4 w-4" />
|
|
{actionLabel}
|
|
</Button>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|