aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/EmptyPlaceholder.tsx
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-24 13:09:50 +0000
committerFuwn <[email protected]>2026-01-24 13:09:50 +0000
commit396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b (patch)
treeb9df4ca6a70db45cfffbae6fdd7252e20fb8e93c /src/components/common/EmptyPlaceholder.tsx
downloadumami-main.tar.xz
umami-main.zip
Initial commitHEADmain
Created from https://vercel.com/new
Diffstat (limited to 'src/components/common/EmptyPlaceholder.tsx')
-rw-r--r--src/components/common/EmptyPlaceholder.tsx28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/components/common/EmptyPlaceholder.tsx b/src/components/common/EmptyPlaceholder.tsx
new file mode 100644
index 0000000..64492e0
--- /dev/null
+++ b/src/components/common/EmptyPlaceholder.tsx
@@ -0,0 +1,28 @@
+import { Column, Icon, Text } from '@umami/react-zen';
+import type { ReactNode } from 'react';
+
+export interface EmptyPlaceholderProps {
+ title?: string;
+ description?: string;
+ icon?: ReactNode;
+ children?: ReactNode;
+}
+
+export function EmptyPlaceholder({ title, description, icon, children }: EmptyPlaceholderProps) {
+ return (
+ <Column alignItems="center" justifyContent="center" gap="5" height="100%" width="100%">
+ {icon && (
+ <Icon color="10" size="xl">
+ {icon}
+ </Icon>
+ )}
+ {title && (
+ <Text weight="bold" size="4">
+ {title}
+ </Text>
+ )}
+ {description && <Text color="muted">{description}</Text>}
+ {children}
+ </Column>
+ );
+}