# @fate-lovely/react-dialog

> a simple dialog component for react

Latest version **0.2.0** (published 2017-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @fate-lovely/react-dialog
pnpm add @fate-lovely/react-dialog
yarn add @fate-lovely/react-dialog
bun add @fate-lovely/react-dialog
```

## 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.2.0 |
| Published | 2017-05-24 |
| First published | 2016-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | CJ Ting |
| Maintainers | fate-lovely |
| Keywords | react-component, react, dialog, alert |

## Links

- npm: https://www.npmjs.com/package/@fate-lovely/react-dialog
- Repository: https://github.com/fate-lovely/react-dialog
- Issues: https://github.com/fate-lovely/react-dialog/issues
- npm.io page: https://npm.io/package/@fate-lovely/react-dialog

## 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.2.0 (latest) — 2017-05-24
- 0.1.8 — 2016-11-25
- 0.1.7 — 2016-11-25
- 0.1.6 — 2016-11-25
- 0.1.5 — 2016-10-19
- 0.1.4 — 2016-10-12
- 0.1.3 — 2016-08-03
- 0.1.2 — 2016-07-18
- 0.1.1 — 2016-07-15
- 0.1.0 — 2016-07-15
- 0.0.0 — 2016-07-14

## README

# React Dialog

[![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](http://mit-license.org/2016)

a simple dialog component for React

## Installation

### npm
```shell
npm i --save @fate-lovely/react-dialog
```

### cdn
```html
<script src="https://unpkg.com/@fate-lovely/react-dialog/dist/index.js"></script>
```

## Usage

```javascript
import { showDialog, Dialog } from "@fate-lovely/react-dialog"

const MyDialog = () =>
  <Dialog>
    <h1>Hello World</h1>
  </Dialog>

class App extends React.Component {
  ...
  onClick() {
    showDialog(MyDialog, props)
  }
}
```

## Props

- `className: PorpTypes.string`
- `okButtonText: PropTypes.string`
- `cancelButtonText: PropTypes.string`
- `okButtonCB: PropTypes.func`, dialog instance as first param `cmp`, you can call `cmp.destroy()` to destroy dialog
- `cancelButtonCB: PropTypes.func`, dialog instance as first param `cmp`, you can call `cmp.destroy()` to destroy dialog
- `hideCancelButton: PropTypes.bool`
- `title: PorpTypes.string`
- `okButtonDisabled PropTypes.bool`

## License
Released under the [MIT license](http://mit-license.org/2016)

---
_Source: https://npm.io/package/@fate-lovely/react-dialog · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
