first commit

This commit is contained in:
2026-08-07 09:40:16 +03:30
commit 0c51b30059
37 changed files with 5146 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
"use client";
export function Skeleton({ className = "" }: { className?: string }) {
return <div className={`skeleton ${className}`} />;
}
// اسکلتِ جدولِ در حالِ لود — با سطر/ستونِ دلخواه.
export function TableSkeleton({
rows = 5,
cols = 5,
}: {
rows?: number;
cols?: number;
}) {
return (
<div className="card p-2 overflow-hidden">
<table>
<thead>
<tr>
{Array.from({ length: cols }).map((_, i) => (
<th key={i}>
<Skeleton className="h-3 w-16" />
</th>
))}
</tr>
</thead>
<tbody>
{Array.from({ length: rows }).map((_, r) => (
<tr key={r}>
{Array.from({ length: cols }).map((_, c) => (
<td key={c}>
<Skeleton className="h-3.5 w-24" />
</td>
))}
</tr>
))}
</tbody>
</table>
</div>
);
}