# @jdl2/dialog

> A dialog based on `react-modal`. You may define more than one modal at any given time.

Latest version **2.0.0-alpha.30** (published 2018-09-27) · 0 weekly downloads

## Install

```sh
npm install @jdl2/dialog
pnpm add @jdl2/dialog
yarn add @jdl2/dialog
bun add @jdl2/dialog
```

## 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 | 2.0.0-alpha.30 |
| Published | 2018-09-27 |
| First published | 2018-07-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kzantow |

## Links

- npm: https://www.npmjs.com/package/@jdl2/dialog
- npm.io page: https://npm.io/package/@jdl2/dialog

## Dependencies (4)

- [react](https://npm.io/package/react.md) *
- [react-dom](https://npm.io/package/react-dom.md) *
- [prop-types](https://npm.io/package/prop-types.md) *
- [react-addons-css-transition-group](https://npm.io/package/react-addons-css-transition-group.md) *

## Recent versions

- 2.0.0-alpha.30 (latest) — 2018-09-27
- 2.0.0-alpha.29 — 2018-08-14
- 2.0.0-alpha.27 — 2018-07-24
- 2.0.0-alpha.25 — 2018-07-18
- 2.0.0-alpha.20 — 2018-07-17
- 2.0.0-alpha.18 — 2018-07-12
- 2.0.0-alpha.17 — 2018-07-12
- 2.0.0-alpha.13 — 2018-07-03

## README

# Dialog

A dialog based on `react-modal`. You may define more than one modal at any given time.

```JSX
addDialog(title: string, className: string, children: JSX.Element, onDismiss?: () => void)

const title = 'My Dialog'
const additionalClass = 'outline'
const content = <span>Some modal content</span>
const onDismiss = jest.fn()

// Add dialog(s). Note, additional dialogs will appear above previous.
dialogs.addDialog(title, additionalClass, content, onDismiss);
dialogs.addDialog(title, additionalClass, content, onDismiss);
setTimeout(() => {
    dialogs.addDialog(title, additionalClass, content, onDismiss); // 3rd on top of stack
}, 5000);
dialogs.render();
```

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