UNPKG

@auraxy/react-async-button

Version:

A button component of react, realizes the button auto-lock when it clicked and auto-unlock after the async action has done

33 lines (25 loc) 1.32 kB
# @auraxy/react-async-button [![NPM Version](http://img.shields.io/npm/v/@auraxy/react-async-button.svg?style=flat-square)](https://www.npmjs.com/package/@auraxy/react-async-button) [![Download Month](http://img.shields.io/npm/dm/@auraxy/react-async-button.svg?style=flat-square)](https://www.npmjs.com/package/@auraxy/react-async-button) ![gzip with dependencies: kb](https://img.shields.io/badge/gzip--with--dependencies-kb-brightgreen.svg "gzip with dependencies: kb") ![typescript](https://img.shields.io/badge/typescript-supported-blue.svg "typescript") ![pkg.module](https://img.shields.io/badge/pkg.module-supported-blue.svg "pkg.module") > `pkg.module supported`, which means that you can apply tree-shaking in you project A button component of react, realizes the button auto-lock when it clicked and auto-unlock after the async action has done ## Installation ```bash npm i -S @auraxy/react-async-button ``` ## Global name `ReactAsyncButton` ## Interface See in [index.d.ts](./index.d.ts) ## Usage ```js import * as ReactAsyncButton from '@auraxy/react-async-button' ``` Use in html, see what your can use in [CDN: unpkg](https://unpkg.com/@auraxy/react-async-button/lib/umd/) ```html <-- use what you want --> <script src="https://unpkg.com/@auraxy/react-async-button/lib/umd/<--module-->.js"></script> ```