# material-async-button

> React Material UI button for async function

Latest version **0.0.3** (published 2019-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install material-async-button
pnpm add material-async-button
yarn add material-async-button
bun add material-async-button
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-12-27 |
| First published | 2019-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^10.15.3 |
| Dependencies | 2 |
| Unpacked size | 10 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eugene Formanenko |
| Maintainers | mo4islona |
| Keywords | react, async, button, material-ui, material |

## Links

- npm: https://www.npmjs.com/package/material-async-button
- Repository: https://github.com/mo4islona/material-async-button
- Homepage: https://github.com/mo4islona/material-async-button#readme
- Issues: https://github.com/mo4islona/material-async-button/issues
- npm.io page: https://npm.io/package/material-async-button

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [@material-ui/icons](https://npm.io/package/@material-ui/icons.md) ^4.2.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2019-12-27
- 0.0.2 — 2019-12-27
- 0.0.1 — 2019-12-27

## README

# React Material Async Button

## Install
```shell
yarn add material-async-button
```

## Usage

```jsx
import React from "react";
import { render } from "react-dom";
import Button from "material-async-button";

function asyncSuccess(text) {
   return new Promise((resolve) => {
     setTimeout(() => {
       console.log(text || 'Success')
       resolve();
     }, 1000);
   });
}

function App() {
  return (
    <div>
        <Button iconDelay={1000} action={asyncSuccess} variant="contained">Save</Button>
        <Button
          progressColor="secondary"
          action={() => asyncSuccess('Test')}
          color="primary"
          variant="contained"
        >
          Save
        </Button>
    </div>
  );
}

render(
  <App/>,
  document.getElementById("root"),
);
```

---
_Source: https://npm.io/package/material-async-button · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
