# @enduranceidehen/modal-manager

> Easy to use modal creator for React JS

Latest version **1.0.11** (published 2020-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @enduranceidehen/modal-manager
pnpm add @enduranceidehen/modal-manager
yarn add @enduranceidehen/modal-manager
bun add @enduranceidehen/modal-manager
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2020-10-07 |
| First published | 2020-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | enduranceidehen |

## Links

- npm: https://www.npmjs.com/package/@enduranceidehen/modal-manager
- Repository: https://github.com/endurance/modal-manager
- Homepage: https://github.com/endurance/modal-manager#readme
- Issues: https://github.com/endurance/modal-manager/issues
- npm.io page: https://npm.io/package/@enduranceidehen/modal-manager

## Dependencies (2)

- [events](https://npm.io/package/events.md) ^3.2.0
- [autobind-decorator](https://npm.io/package/autobind-decorator.md) ^2.4.0

## Recent versions

- 1.0.11 (latest) — 2020-10-07

## README

# React Modal Manager

A simple programmatic interface for rendering your modal components.

## Why?

It would be nice if we could render a modal on demand, rather than embedding the component inside our views directly.

## How do I use it?

First, Declare the `ModalContainer` at the root of your application

```typescript jsx
const App = () => {
  <div>
    <Router>
      stuff
    </Router>
    <ModalContainer />
  </div>
}
```

Next, whenever you want to programmatically render a modal, use the `renderModal` function, and pass your component.
```typescript jsx
    renderModal(props => {
      return (
        <Dialog {...props}>
          <DialogContent>Rendered Modal</DialogContent>
        </Dialog>
      );
    });
```

Simple as that.


# License
MIT

# Author
Endurance Idehen

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