diff options
Diffstat (limited to 'src/components/common/EmptyPlaceholder.tsx')
| -rw-r--r-- | src/components/common/EmptyPlaceholder.tsx | 28 |
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> + ); +} |