feat(dashboard): added new Pages
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user