feat(dashboard): added new Pages

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-04 11:19:10 +02:00
parent 4e5adbedff
commit 7e941080dc
26 changed files with 635 additions and 132 deletions

View File

@@ -110,6 +110,39 @@ const TableCaption = React.forwardRef<
));
TableCaption.displayName = 'TableCaption';
export function TableSkeleton({
rows = 10,
cols = 2,
}: {
rows?: number;
cols?: number;
}) {
return (
<Table>
<TableHeader>
<TableRow>
{Array.from({ length: cols }).map((_, j) => (
<TableHead key={j}>
<div className="h-4 w-1/4 animate-pulse rounded-full bg-def-300" />
</TableHead>
))}
</TableRow>
</TableHeader>
<TableBody>
{Array.from({ length: rows }).map((_, i) => (
<TableRow key={i}>
{Array.from({ length: cols }).map((_, j) => (
<TableCell key={j}>
<div className="h-4 w-1/4 min-w-20 animate-pulse rounded-full bg-def-300" />
</TableCell>
))}
</TableRow>
))}
</TableBody>
</Table>
);
}
export {
Table,
TableHeader,