14 lines
401 B
JavaScript
14 lines
401 B
JavaScript
import { Skeleton } from "@mui/material"
|
|
|
|
function MultilineLoading({ loading, width, height, children, line }) {
|
|
return loading ? Array(line).fill({}).map(_ => (
|
|
<Skeleton
|
|
className={`${width === 'full' ? '!w-full' : ''} !my-2`}
|
|
variant="rounded"
|
|
height={height}
|
|
width={width}
|
|
/>
|
|
)) : children
|
|
}
|
|
|
|
export default MultilineLoading |