import { Skeleton } from "@mui/material";

function CustomLoading({ width, height, children, loading }) {
  return loading ? (
    <Skeleton
      className={width === "full" ? "!w-full" : ""}
      height={height}
      variant="rounded"
      width={width}
    />
  ) : (
    children
  );
}

export default CustomLoading;
