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;
