Files
ServerKit/frontend/src/components/EmptyState.jsx
T
Juan DenisandClaude Opus 4.8 ad9acb89e3 refactor(frontend): Phase 5 §8.5 — drop 142 unused React imports (JSX transform)
Per docs/plans/FRONTEND_UX_TAILWIND_CLEANUP_PLAN.md §8.5. React 18's automatic
JSX runtime makes 'import React' unnecessary; removed it from the 142 files
eslint flagged as 'React defined but never used' (named imports like useState
preserved). Driven by an eslint --format json pass so only flagged files were
touched.

Lint warnings: 1603 -> 1461 (0 errors). Verified: npm run build passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 02:44:16 -04:00

36 lines
1.0 KiB
React

import { Inbox } from 'lucide-react';
import { Spinner } from './Spinner';
export default function EmptyState({
icon: Icon = Inbox,
title = 'No items found',
description = '',
action = null,
size = 'default',
loading = false
}) {
if (loading) {
return (
<div className={`empty-state empty-state--${size}`}>
<Spinner size={size === 'lg' ? 'lg' : 'md'} />
{title && <h3 className="empty-state__title">{title}</h3>}
</div>
);
}
return (
<div className={`empty-state empty-state--${size}`}>
<div className="empty-state__icon">
<Icon size={size === 'lg' ? 64 : 48} />
</div>
<h3 className="empty-state__title">{title}</h3>
{description && (
<p className="empty-state__description">{description}</p>
)}
{action && (
<div className="empty-state__action">{action}</div>
)}
</div>
);
}