mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 06:26:16 +00:00
#591 - backups
This commit is contained in:
48
resources/js/components/table-skeleton.tsx
Normal file
48
resources/js/components/table-skeleton.tsx
Normal file
@ -0,0 +1,48 @@
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
export function TableSkeleton({ modal }: { modal?: boolean }) {
|
||||
const extraClasses = modal && 'border-none shadow-none';
|
||||
|
||||
return (
|
||||
<div className={cn('rounded-md border shadow-xs', extraClasses)}>
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead>
|
||||
<Skeleton className="h-3 w-[100px]" />
|
||||
</TableHead>
|
||||
<TableHead>
|
||||
<Skeleton className="h-3 w-[100px]" />
|
||||
</TableHead>
|
||||
<TableHead>
|
||||
<Skeleton className="h-3 w-[100px]" />
|
||||
</TableHead>
|
||||
<TableHead>
|
||||
<Skeleton className="h-3 w-[100px]" />
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{[...Array(3)].map((_, i) => (
|
||||
<TableRow key={i}>
|
||||
<TableCell>
|
||||
<Skeleton className="h-5 w-[100px]" />
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Skeleton className="h-5 w-[100px]" />
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Skeleton className="h-5 w-[100px]" />
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Skeleton className="h-5 w-[100px]" />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user