Split 879-LOC page.tsx into 187 LOC with 11 colocated components, _types.ts and _constants.ts for the industry templates module. Behavior preserved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
855 B
TypeScript
20 lines
855 B
TypeScript
export function ErrorPanel({ message, onRetry }: { message: string; onRetry: () => void }) {
|
|
return (
|
|
<div className="bg-red-50 border border-red-200 rounded-xl p-5 flex items-start gap-3">
|
|
<svg className="w-5 h-5 text-red-500 flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
</svg>
|
|
<div className="flex-1">
|
|
<p className="text-red-700 font-medium">Fehler</p>
|
|
<p className="text-red-600 text-sm mt-1">{message}</p>
|
|
</div>
|
|
<button
|
|
onClick={onRetry}
|
|
className="px-4 py-1.5 text-sm font-medium text-red-700 bg-red-100 hover:bg-red-200 rounded-lg transition-colors"
|
|
>
|
|
Erneut versuchen
|
|
</button>
|
|
</div>
|
|
)
|
|
}
|