File size: 661 Bytes
f9c7101 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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>
);
}
|