# rc-confirm-alert

> alert window

Latest version **1.0.8** (published 2019-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install rc-confirm-alert
pnpm add rc-confirm-alert
yarn add rc-confirm-alert
bun add rc-confirm-alert
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2019-10-29 |
| First published | 2019-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 53.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | rehat101 |
| Keywords | alert, react alert |

## Links

- npm: https://www.npmjs.com/package/rc-confirm-alert
- Repository: https://github.com/rehat101/rc-confirm-alert
- Homepage: https://github.com/rehat101/rc-confirm-alert#readme
- Issues: https://github.com/rehat101/rc-confirm-alert/issues
- npm.io page: https://npm.io/package/rc-confirm-alert

## Dependencies (1)

- [styled-components](https://npm.io/package/styled-components.md) ^4.3.2

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.8 (latest) — 2019-10-29
- 1.0.7 — 2019-10-28
- 1.0.6 — 2019-09-17
- 1.0.5 — 2019-09-17
- 1.0.4 — 2019-09-17
- 1.0.3 — 2019-09-17
- 1.0.2 — 2019-09-17
- 1.0.1 — 2019-09-16
- 1.0.0 — 2019-09-16

## README

# rc-confirm-alert

Yet another confirm alert for React

## Installation
`npm install rc-confirm-alert`

## Usage

Use it as a function

```javascript
import { reactAlert } from 'rc-confirm-alert';

reactAlert({
  width: '500px',
  title: 'Are you sure?',
  onCancel: () => doSomethingOnCancel(),
  onConfirm: () => doSomethingOnConfirm(),
});
```

Also supports hooks

```javascript
import { useReactAlert } from 'rc-confirm-alert';

function UI() {
  const dialog = useReactAlert();

  return (
    <React.Fragment>
      <button onClick={() => dialog.open()}>Open Modal</button>
    </React.Fragment>
  );
}
```

Custom UI

```javascript
import { reactAlert } from 'rc-confirm-alert';

reactAlert({
  render: (props) => <CustomUI {...props} />,
  onCancel: () => { ... },
  onConfirm: () => { ... },
});
```

```javascript
function CustomUI({ cancel, confirm }) { ... }
```

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