import type { ComponentType, ReactNode, SVGProps } from "react"; import { ExclamationTriangleIcon } from "@heroicons/react/20/solid"; import { SECONDARY_BUTTON_CLASS } from "./ui"; type IconComponent = ComponentType>; // Shared chrome for non-critical "the content isn't there" states. Full-page // crashes are handled by the root ErrorBoundary; these render inside the // current content column. function StatePanel({ children }: { children: ReactNode }) { return (
{children}
); } export function EmptyState({ icon: Icon, title, description, action, }: { icon?: IconComponent; title: string; description?: string; action?: ReactNode; }) { return ( {Icon ? ( ); } export function ErrorState({ title = "Something went wrong", description, onRetry, }: { title?: string; description?: string; onRetry?: () => void; }) { return ( ); } export function LoadingState({ label }: { label?: string }) { return (

{label ?? "Loading…"}

); } function Spinner({ className = "" }: { className?: string }) { return ( ); }