xonecas.io
53129
Pa

PAT / commit 51dd4c5

feat: error component

xonecas2025-12-18 51dd4c55b662ce1894c912b38edd153143674eda parent 0430706

2 files changed

src/components/ErrorNotification.tsx+18−0
@@ -0,0 +1,18 @@
1+"use client";
2+
3+import ErrorIcon from "@/src/components/icons/ErrorIcon";
4+
5+type ErrorNotificationProps = {
6+ message: string;
7+};
8+
9+export default function ErrorNotification({ message }: ErrorNotificationProps) {
10+ return (
11+ <div className="pointer-events-auto mb-2 flex w-fit items-center gap-2 rounded-lg bg-neutral-300/80 px-3 py-1 dark:bg-neutral-800/80">
12+ <ErrorIcon className="h-4 w-4 text-red-600 dark:text-red-400" />
13+ <span className="text-xs text-neutral-600 dark:text-neutral-400">{message}</span>
14+ </div>
15+ );
16+}
17+
18+
src/components/icons/ErrorIcon.tsx+20−0
@@ -0,0 +1,20 @@
1+export default function ErrorIcon({ className }: { className?: string }) {
2+ return (
3+ <svg
4+ xmlns="http://www.w3.org/2000/svg"
5+ viewBox="0 0 24 24"
6+ fill="none"
7+ stroke="currentColor"
8+ strokeWidth="2"
9+ strokeLinecap="round"
10+ strokeLinejoin="round"
11+ className={className}
12+ >
13+ <circle cx="12" cy="12" r="10" />
14+ <path d="M12 8v4" />
15+ <path d="M12 16h.01" />
16+ </svg>
17+ );
18+}
19+
20+