Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 72x 1355x | import { Box, Stack, Skeleton } from "@mui/material";
export default function LoadingState({ length = 20 }: { length?: number }) {
return (
<Box
p={2}
pt="20px"
sx={{
width: "100%",
height: "100%",
maxHeight: "100%",
overflow: "hidden",
}}
>
<Stack spacing={2.5}>
{Array.from({ length: length }).map((_, index) => (
<Stack
key={index}
direction="row"
spacing={2}
sx={{ alignItems: "flex-start" }}
>
<Skeleton
variant="circular"
width={24}
height={24}
sx={{ flexShrink: 0 }}
/>
<Stack spacing={1} sx={{ flex: 1 }}>
<Skeleton
variant="rounded"
width={300}
height={24}
sx={{ borderRadius: "20px" }}
/>
<Skeleton
variant="rounded"
width={150}
height={12}
sx={{ borderRadius: "20px" }}
/>
<Skeleton
variant="rounded"
width={150}
height={12}
sx={{ borderRadius: "20px" }}
/>
</Stack>
</Stack>
))}
</Stack>
</Box>
);
}
|