import type { DsProps } from './props'; import * as React from 'react'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; /** * EmptyState — what a region shows when it has nothing to show. * * Deliberately distinguishes two situations that need different copy and * different actions: * * - `empty` — nothing exists yet. Offer the action that creates the first one. * - `filtered` — things exist but none match. Offer to clear the filters. * * Pages that conflate them end up telling a user with 22 candidates that they * have no candidates. */ /** @param {any} props */ export function EmptyState({ icon: Icon, title, description, /** Primary action — a ); }; return (
{Icon && ( )}

{title}

{description && (

{description}

)} {(action || secondaryAction) && (
{renderAction(action, 'default')} {renderAction(secondaryAction, 'outline')}
)}
); }