mirror of
https://github.com/chartdb/chartdb.git
synced 2025-11-22 07:21:17 +00:00
empty state
This commit is contained in:
27
src/components/empty-state/empty-state.tsx
Normal file
27
src/components/empty-state/empty-state.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
import EmptyStateImage from '@/assets/empty_state.png';
|
||||
import { Label } from '@/components/label/label';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
export interface EmptyStateProps {
|
||||
title: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export const EmptyState = forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement> & EmptyStateProps
|
||||
>(({ title, description, className }) => (
|
||||
<div
|
||||
className={cn(
|
||||
'flex flex-col items-center justify-center space-y-1',
|
||||
className
|
||||
)}
|
||||
>
|
||||
<img src={EmptyStateImage} alt="Empty state" className="w-32" />
|
||||
<Label className="text-md">{title}</Label>
|
||||
<Label className="font-normal text-muted-foreground text-sm">
|
||||
{description}
|
||||
</Label>
|
||||
</div>
|
||||
));
|
||||
Reference in New Issue
Block a user