Skip to content

afeiship/react-ant-async-button

Repository files navigation

react-ant-async-button

Async link with loading based on antd.

version license size download

installation

npm install -S @jswork/react-ant-async-button

usage

import React from 'react';
import ReactAntAsyncButton from '@jswork/react-ant-async-button';
import styled from 'styled-components';

const Container = styled.div`
  width: 80%;
  margin: 30px auto 0;
`;

export default () => {
  return (
    <Container>
      <ReactAntAsyncButton
        minGap={2000}
        callback={() => {
          return new Promise((resolve) => {
            setTimeout(() => {
              resolve(null);
            }, 100);
          });
        }}>
        Download
      </ReactAntAsyncButton>
    </Container>
  );
};

preview

license

Code released under the MIT license.

About

Async button with loading based on antd.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors