'use client';
import React from 'react';
export interface ErrorDisplayProps {
title?: string;
message: string;
retry?: () => void;
retryLabel?: string;
}
export function ErrorDisplay({
title = 'Something went wrong',
message,
retry,
retryLabel = 'Try again',
}: ErrorDisplayProps) {
return (
{retry && (
)}
);
}
export interface EmptyStateProps {
title: string;
description?: string;
icon?: React.ReactNode;
action?: {
label: string;
onClick: () => void;
};
}
export function EmptyState({
title,
description,
icon,
action,
}: EmptyStateProps) {
return (
{icon &&
{icon}
}
{title}
{description && (
{description}
)}
{action && (
)}
);
}