mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-04 00:53:14 +00:00
29 lines
811 B
TypeScript
29 lines
811 B
TypeScript
import { Skeleton } from "@mui/material";
|
|
|
|
type TableSkeletonRowsProps = {
|
|
rows?: number;
|
|
columns: { key: string; width: number }[];
|
|
rowHeight?: number;
|
|
};
|
|
|
|
export function TableSkeletonRows({ rows = 3, columns, rowHeight = 52 }: TableSkeletonRowsProps) {
|
|
return (
|
|
<>
|
|
{Array.from({ length: rows }, (_, rowIndex) => (
|
|
<tr key={rowIndex} style={{ height: rowHeight }}>
|
|
{columns.map((col) => (
|
|
<td key={col.key} style={{ padding: "0 14px", width: col.width, minWidth: col.width }}>
|
|
<Skeleton
|
|
variant="rounded"
|
|
height={14}
|
|
width="72%"
|
|
animation="wave"
|
|
sx={{ bgcolor: "action.hover" }}
|
|
/>
|
|
</td>
|
|
))}
|
|
</tr>
|
|
))}
|
|
</>
|
|
);
|
|
}
|