EnergyVenom's picture
Deploy Patch Testing Co-worker
f9c7101 verified
Raw History Blame Contribute Delete
661 Bytes
import type { ReactNode } from 'react';
/** A quiet, centred "nothing here yet" block: icon, one title line, an explanation and at most one action. */
export function EmptyState({ icon, title, body, action, testId }: { icon?: ReactNode; title: string; body?: ReactNode; action?: ReactNode; testId?: string }) {
return (
<div className="fpt-empty" data-testid={testId}>
{icon && <div className="fpt-empty-icon" aria-hidden>{icon}</div>}
<div className="fpt-empty-title">{title}</div>
{body && <div className="fpt-empty-body">{body}</div>}
{action && <div className="fpt-empty-action">{action}</div>}
</div>
);
}