veza/apps/web/src/components/ui/data-list/DataListSkeleton.tsx
senke 5791051a5e refactor(ui): extract DataList into data-list module
- types, DataListSkeleton, DataListEmpty, DataListError, DataList
- Remove duplicate Modal/Dropdown from DataList.tsx (exist in modal.tsx/dropdown.tsx)
- Stories: Default, Loading, Empty, Error, Skeleton (min-h-layout-story)
- Re-export from DataList.tsx

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 22:35:53 +01:00

28 lines
599 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { cn } from '@/lib/utils';
const SKELETON_COUNT = 3;
interface DataListSkeletonProps {
className?: string;
count?: number;
}
/**
* Skeleton pour létat Loading de DataList.
*/
export function DataListSkeleton({
className,
count = SKELETON_COUNT,
}: DataListSkeletonProps) {
return (
<div className={cn('space-y-2', className)}>
{Array.from({ length: count }).map((_, index) => (
<div
key={index}
className="animate-pulse bg-kodo-slate dark:bg-kodo-steel rounded h-16"
aria-hidden="true"
/>
))}
</div>
);
}