import React from 'react';
import { TableRow, TableCell, Skeleton } from '@mui/material';

export default function TableLoader({ rows = 5, columns = 6, height = 40 }) {
  return (
    <>
      {[...Array(rows)].map((_, rowIndex) => (
        <TableRow key={rowIndex}>
          {[...Array(columns)].map((_, colIndex) => (
            <TableCell key={colIndex}>
              <Skeleton variant="rectangular" height={height} width={70} animation="wave" />
            </TableCell>
          ))}
        </TableRow>
      ))}
    </>
  );
}
