# dragovic-modal-package

> A package to show or hide a modal

Latest version **1.0.5** (published 2023-03-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install dragovic-modal-package
pnpm add dragovic-modal-package
yarn add dragovic-modal-package
bun add dragovic-modal-package
```

## 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.5 |
| Published | 2023-03-27 |
| First published | 2023-03-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 151.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dragovic Mathias |
| Maintainers | dragovic |
| Keywords | Modals |

## Links

- npm: https://www.npmjs.com/package/dragovic-modal-package
- Repository: https://github.com/Mat2dr/modal-package
- Homepage: https://github.com/Mat2dr/modal-package#readme
- Issues: https://github.com/Mat2dr/modal-package/issues
- npm.io page: https://npm.io/package/dragovic-modal-package

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [post-robot](https://npm.io/package/post-robot.md) — 93.7K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2023-03-27
- 1.0.0 — 2023-03-15

## README

# modal-package

> Npm package to add a react Modal component

## Prerequisites

This project requires React and NPM.
To make sure you have them available on your machine,
try running the following command.

```sh
$ npm -v
```

## Getting Started

These instructions will get you up and running on your local machine.

## Installation

Here is the link of the npm folder: https://www.npmjs.com/package/dragovic-modal-package?activeTab=readme

Start with adding the package on your local machine:

```sh
$ npm install dragovic-modal-package
```

## Usage

### Import and setup the package

Import the package:

```sh
$ import { Modal } from 'dragovic-modal-package';
```

Add the state to control if the modal is visible or not ( Default to false ):

```sh
const [show, setShow] = useState(false);
```

Then add the modal component to the page:

```sh
<Modal title='' onClose={ ()=> setShow(false) } show={ show } />
```

### Customization

You can change the content inside the modal by adding a title.
Exemple:

```sh
<Modal title='Employee created' onClose={ ()=> setShow(false) } show={ show } />
```

## Author

- **Mathias DRAGOVIC** - [Github](https://github.com/Mat2dr)

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