The admin-v2 application was incomplete in the repository. This commit restores all missing components: - Admin pages (76 pages): dashboard, ai, compliance, dsgvo, education, infrastructure, communication, development, onboarding, rbac - SDK pages (45 pages): tom, dsfa, vvt, loeschfristen, einwilligungen, vendor-compliance, tom-generator, dsr, and more - Developer portal (25 pages): API docs, SDK guides, frameworks - All components, lib files, hooks, and types - Updated package.json with all dependencies The issue was caused by incomplete initial repository state - the full admin-v2 codebase existed in backend/admin-v2 and docs-src/admin-v2 but was never fully synced to the main admin-v2 directory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
73 lines
2.1 KiB
TypeScript
73 lines
2.1 KiB
TypeScript
interface InfoBoxProps {
|
|
variant: 'info' | 'tip' | 'warning' | 'error'
|
|
title?: string
|
|
children: React.ReactNode
|
|
className?: string
|
|
}
|
|
|
|
const variants = {
|
|
info: {
|
|
bg: 'bg-blue-50',
|
|
border: 'border-blue-200',
|
|
icon: '💡',
|
|
titleColor: 'text-blue-800',
|
|
textColor: 'text-blue-700',
|
|
},
|
|
tip: {
|
|
bg: 'bg-green-50',
|
|
border: 'border-green-200',
|
|
icon: '✨',
|
|
titleColor: 'text-green-800',
|
|
textColor: 'text-green-700',
|
|
},
|
|
warning: {
|
|
bg: 'bg-amber-50',
|
|
border: 'border-amber-200',
|
|
icon: '⚠️',
|
|
titleColor: 'text-amber-800',
|
|
textColor: 'text-amber-700',
|
|
},
|
|
error: {
|
|
bg: 'bg-red-50',
|
|
border: 'border-red-200',
|
|
icon: '❌',
|
|
titleColor: 'text-red-800',
|
|
textColor: 'text-red-700',
|
|
},
|
|
}
|
|
|
|
export function InfoBox({ variant, title, children, className = '' }: InfoBoxProps) {
|
|
const style = variants[variant]
|
|
|
|
return (
|
|
<div className={`${style.bg} ${style.border} border rounded-xl p-4 ${className}`}>
|
|
<div className="flex gap-3">
|
|
<span className="text-xl flex-shrink-0">{style.icon}</span>
|
|
<div>
|
|
{title && (
|
|
<h4 className={`font-semibold ${style.titleColor} mb-1`}>{title}</h4>
|
|
)}
|
|
<div className={`text-sm ${style.textColor}`}>{children}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
// Convenience components
|
|
export function InfoTip({ title, children, className }: Omit<InfoBoxProps, 'variant'>) {
|
|
return <InfoBox variant="tip" title={title} className={className}>{children}</InfoBox>
|
|
}
|
|
|
|
export function InfoWarning({ title, children, className }: Omit<InfoBoxProps, 'variant'>) {
|
|
return <InfoBox variant="warning" title={title} className={className}>{children}</InfoBox>
|
|
}
|
|
|
|
export function InfoNote({ title, children, className }: Omit<InfoBoxProps, 'variant'>) {
|
|
return <InfoBox variant="info" title={title} className={className}>{children}</InfoBox>
|
|
}
|
|
|
|
export function InfoError({ title, children, className }: Omit<InfoBoxProps, 'variant'>) {
|
|
return <InfoBox variant="error" title={title} className={className}>{children}</InfoBox>
|
|
}
|