Some checks failed
Tests / Go Tests (push) Has been cancelled
Tests / Python Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / Go Lint (push) Has been cancelled
Tests / Python Lint (push) Has been cancelled
Tests / Security Scan (push) Has been cancelled
Tests / All Checks Passed (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Go Security Scan (push) Has been cancelled
Security Scanning / Python Security Scan (push) Has been cancelled
Security Scanning / Node.js Security Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
CI/CD Pipeline / Go Tests (push) Has been cancelled
CI/CD Pipeline / Python Tests (push) Has been cancelled
CI/CD Pipeline / Website Tests (push) Has been cancelled
CI/CD Pipeline / Linting (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build & Push (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / CI Summary (push) Has been cancelled
ci/woodpecker/manual/build-ci-image Pipeline was successful
ci/woodpecker/manual/main Pipeline failed
All services: admin-v2, studio-v2, website, ai-compliance-sdk, consent-service, klausur-service, voice-service, and infrastructure. Large PDFs and compiled binaries excluded via .gitignore.
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>
|
|
}
|