fix(ui): loading skeletons for dashboard/spoons/threads
This commit is contained in:
1 parent
8d7486bc8c
commit
8c579d060a
5 files changed
+213
-61
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { cn, Skeleton } from '@spoon/ui';
|
||||
|
||||
export const ListSkeleton = ({
|
||||
rows = 3,
|
||||
rowClassName = 'h-20 w-full',
|
||||
className,
|
||||
}: {
|
||||
rows?: number;
|
||||
rowClassName?: string;
|
||||
className?: string;
|
||||
}) => (
|
||||
<div
|
||||
role='status'
|
||||
aria-label='Loading'
|
||||
data-testid='list-skeleton'
|
||||
className={cn('space-y-3', className)}
|
||||
>
|
||||
{Array.from({ length: rows }).map((_, index) => (
|
||||
<Skeleton key={index} className={rowClassName} />
|
||||
))}
|
||||
<span className='sr-only'>Loading</span>
|
||||
</div>
|
||||
);
|
||||
Reference in new issue
Block a user