File
Blob: src/client/components/ui/error-banner.tsx
| 1 | import type { ReactNode } from "react"; |
| 2 | |
| 3 | interface ErrorBannerProps { |
| 4 | children: ReactNode; |
| 5 | className?: string; |
| 6 | } |
| 7 | |
| 8 | export function ErrorBanner({ children, className }: ErrorBannerProps) { |
| 9 | return ( |
| 10 | <p |
| 11 | role="alert" |
| 12 | className={["rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-2 text-sm text-red-400", className] |
| 13 | .filter(Boolean) |
| 14 | .join(" ")} |
| 15 | > |
| 16 | {children} |
| 17 | </p> |
| 18 | ); |
| 19 | } |