Files
Red-Bull-Tracker/src/components/EmptyState.tsx
T
nh9961 50c729eae7 refactor: decompose monolithic App.tsx into per-component files
- Extract views to src/components/views/ (Overview, Logbook, Trends, Settings, Auth)
- Extract standalone components (EntryModal, ImportPreviewModal, ConfirmDialog,
  Sidebar, TopBar, MobileNav, EntryLedger, FiltersPanel, QuickAddPanel, etc.)
- Move shared helpers to src/lib (dashboard, filters, userDisplay) and static
  data to src/data (accents, quickAdds)
- App.tsx now orchestration-only (2971 -> 777 lines); no behavior change
2026-07-19 19:31:40 +00:00

27 lines
735 B
TypeScript

import { Plus, Zap } from "lucide-react";
type EmptyStateProps = {
title: string;
copy: string;
actionLabel?: string;
onAction?: () => void;
};
export function EmptyState({ title, copy, actionLabel, onAction }: EmptyStateProps) {
return (
<div className="empty-state">
<div className="empty-state-icon">
<Zap size={22} aria-hidden="true" />
</div>
<h3 className="empty-state-title">{title}</h3>
<p className="empty-state-copy mt-2 max-w-sm">{copy}</p>
{actionLabel && onAction && (
<button className="primary-button mt-4" type="button" onClick={onAction}>
<Plus size={17} aria-hidden="true" />
{actionLabel}
</button>
)}
</div>
);
}