17 lines
321 B
JavaScript
17 lines
321 B
JavaScript
import { Skeleton } from "@mui/material";
|
|
|
|
function TextLoading({ loading, width, height, children }) {
|
|
return loading ? (
|
|
<Skeleton
|
|
className={width === "full" ? "!w-full" : ""}
|
|
variant="rounded"
|
|
height={height}
|
|
width={width}
|
|
/>
|
|
) : (
|
|
children
|
|
);
|
|
}
|
|
|
|
export default TextLoading;
|