import { Skeleton } from "./skeleton";
import { TableBody, TableCell, TableRow } from "./table";

interface IProps {
  length?: number;
  column: number;
}

const TableSkeleton = ({ column, length = 20 }: IProps) => {
  return (
    <TableBody>
      {Array.from({ length }).map((_, i) => (
        <TableRow key={i}>
          {Array.from({ length: column }).map((_, j) => (
            <TableCell key={j} colSpan={100}>
              <Skeleton className="h-8" />
            </TableCell>
          ))}
        </TableRow>
      ))}
    </TableBody>
  );
};

export default TableSkeleton;
