import { Button, Skeleton } from "antd"; import type { ReactNode } from "react"; import { WorkspaceSignalIcon, type WorkspaceSignalIconVariant } from "@/components/ui/aceternity/workspace-signal-icon"; import { cn } from "@/lib/utils"; export function WorkspaceState({ icon = "empty", title, description, action, compact = false, className }: { icon?: WorkspaceSignalIconVariant; title: string; description?: string; action?: ReactNode; compact?: boolean; className?: string }) { return ( {title} {description ? {description} : null} {action ? {action} : null} ); } export function WorkspaceErrorState({ title = "暂时无法加载", description, actionLabel = "重新加载", onRetry, compact = false }: { title?: string; description?: string; actionLabel?: string; onRetry?: () => void; compact?: boolean }) { return {actionLabel} : undefined} />; } export function WorkspaceLoadingState({ label = "正在加载内容", detail, rows = 3, className }: { label?: string; detail?: string; rows?: number; className?: string }) { return ( {label}{detail ? {detail} : null} {Array.from({ length: rows }, (_, index) => )} ); }
{description}