0.2.1 • Published 4 years ago

antd-lazy-loading v0.2.1

Weekly downloads
29
License
MIT
Repository
github
Last release
4 years ago

antd-lazy-loading

Global loading indicator for antd, differd to show.

Installation

npm i antd-lazy-loading

Usage

Edit antd-lazy-loading

import React from "react";
import ReactDOM from "react-dom";
import * as lazyLoading from "antd-lazy-loading";
import { Button } from "antd";
import "antd/dist/antd.css";

import "./styles.css";

function App() {
  return (
    <div className="App" style={{ marginTop: "100px" }}>
      <div>
        <Button onClick={() => lazyLoading.pushRequest()}>Push Request</Button>
      </div>
      <div>
        <Button onClick={() => lazyLoading.popRequest()}>Pop Request</Button>
      </div>
      <div>
        <Button onClick={() => lazyLoading.pushRequest("Please wait")}>
          Push Request with custom text
        </Button>
      </div>
      <div>
        <Button onClick={() => lazyLoading.config("Custom loading", 0)}>
          Change global text and differ time
        </Button>
      </div>
    </div>
  );
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
0.2.1

4 years ago

0.2.0

4 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago