19 lines
681 B
TypeScript
19 lines
681 B
TypeScript
|
|
interface Props {
|
||
|
|
icon?: string;
|
||
|
|
title: string;
|
||
|
|
message: string;
|
||
|
|
actionLabel?: string;
|
||
|
|
onAction?: () => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export default function EmptyState({ icon = '🔍', title, message, actionLabel, onAction }: Props) {
|
||
|
|
return (
|
||
|
|
<div className="text-center py-16 px-4" role="status">
|
||
|
|
<div className="text-6xl mb-4" aria-hidden="true">{icon}</div>
|
||
|
|
<h3 className="text-xl font-semibold mb-2" style={{ color: 'var(--text)' }}>{title}</h3>
|
||
|
|
<p className="max-w-md mx-auto mb-6" style={{ color: 'var(--secondary)' }}>{message}</p>
|
||
|
|
{actionLabel && <button onClick={onAction} className="hms-btn hms-btn-primary">{actionLabel}</button>}
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|