mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-05 06:31:46 +09:00
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>
36 lines
1.0 KiB
React
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>
|
|
);
|
|
}
|