diff --git a/src/components/InfoBlock.tsx b/src/components/Container.tsx
similarity index 74%
rename from src/components/InfoBlock.tsx
rename to src/components/Container.tsx
index 3d622ed7..3bf5bc13 100644
--- a/src/components/InfoBlock.tsx
+++ b/src/components/Container.tsx
@@ -1,7 +1,7 @@
import { clsx } from 'clsx/lite';
import { ReactNode } from 'react';
-export default function InfoBlock({
+export default function Container({
children,
className,
color = 'gray',
@@ -11,7 +11,7 @@ export default function InfoBlock({
}: {
children: ReactNode
className?: string
- color?: 'gray' | 'blue'
+ color?: 'gray' | 'blue' | 'red' | 'yellow'
padding?: 'loose' | 'normal' | 'tight'
centered?: boolean
spaceChildren?: boolean
@@ -28,6 +28,16 @@ export default function InfoBlock({
'bg-blue-50/50 border-blue-200',
'dark:bg-blue-950/30 dark:border-blue-600/50',
];
+ case 'red': return [
+ 'text-red-600 dark:text-red-500/90',
+ 'bg-red-50/50 dark:bg-red-950/50',
+ 'border-red-100 dark:border-red-950',
+ ];
+ case 'yellow': return [
+ 'text-amber-700 dark:text-amber-500/90',
+ 'bg-amber-50/50 dark:bg-amber-950/30',
+ 'border-amber-200/80 dark:border-amber-800/30',
+ ];
}
};
diff --git a/src/components/ErrorNote.tsx b/src/components/ErrorNote.tsx
index e86a612e..934fa4af 100644
--- a/src/components/ErrorNote.tsx
+++ b/src/components/ErrorNote.tsx
@@ -1,33 +1,22 @@
-import { clsx } from 'clsx/lite';
import { ReactNode } from 'react';
import { BiErrorAlt } from 'react-icons/bi';
+import Note from './Note';
export default function ErrorNote({
className,
children,
- size = 'medium',
}: {
className?: string
children: ReactNode
- size?: 'small' | 'medium'
}) {
return (
-
-
+ }
+ >
{children}
-
+
);
}
diff --git a/src/components/Banner.tsx b/src/components/Note.tsx
similarity index 54%
rename from src/components/Banner.tsx
rename to src/components/Note.tsx
index 62e140c7..e141a701 100644
--- a/src/components/Banner.tsx
+++ b/src/components/Note.tsx
@@ -1,38 +1,39 @@
-import { ReactNode } from 'react';
-import InfoBlock from './InfoBlock';
+import { ComponentProps, ReactNode } from 'react';
+import Container from './Container';
import AnimateItems from './AnimateItems';
import { IoInformationCircleOutline } from 'react-icons/io5';
-export default function Banner({
- icon,
+export default function Note({
children,
- animate,
className,
+ color = 'blue',
+ icon,
+ animate,
}: {
icon?: ReactNode
- children: ReactNode
animate?: boolean
- className?: string
-}) {
+} & ComponentProps
) {
return (
- {icon ?? }
+
+ {icon ?? }
+
{children}
- ,
+ ,
]}
animateOnFirstLoadOnly
/>
diff --git a/src/components/StatusIcon.tsx b/src/components/StatusIcon.tsx
index 46dc94de..2021f2c0 100644
--- a/src/components/StatusIcon.tsx
+++ b/src/components/StatusIcon.tsx
@@ -9,7 +9,7 @@ export default function StatusIcon({
type,
loading,
}: {
- type: 'checked' | 'missing' | 'optional'
+ type: 'checked' | 'missing' | 'warning' | 'optional'
loading?: boolean
}) {
const getIcon = () => {
@@ -24,6 +24,11 @@ export default function StatusIcon({
size={14}
className="text-red-400 translate-x-[2px] translate-y-[1.5px]"
/>;
+ case 'warning':
+ return ;
case 'optional':
return }
+ >
+ {children}
+
+ );
+}
diff --git a/src/photo/PhotosEmptyState.tsx b/src/photo/PhotosEmptyState.tsx
index 184a0428..c3b36166 100644
--- a/src/photo/PhotosEmptyState.tsx
+++ b/src/photo/PhotosEmptyState.tsx
@@ -1,5 +1,5 @@
import AdminCTA from '@/admin/AdminCTA';
-import InfoBlock from '@/components/InfoBlock';
+import Container from '@/components/Container';
import SiteGrid from '@/components/SiteGrid';
import { IS_SITE_READY } from '@/site/config';
import { PATH_ADMIN_CONFIGURATION } from '@/site/paths';
@@ -12,7 +12,7 @@ export default function PhotosEmptyState() {
return (
@@ -47,7 +47,7 @@ export default function PhotosEmptyState() {
}
-