# opcmodal

> Opcmodal a simple and reusable Modal reactJS 😀

Latest version **0.1.11** (published 2022-08-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install opcmodal
pnpm add opcmodal
yarn add opcmodal
bun add opcmodal
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.11 |
| Published | 2022-08-30 |
| First published | 2022-08-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stephan075 |
| Maintainers | stephanmodule |
| Keywords | plugin, modal, reactJS |

## Links

- npm: https://www.npmjs.com/package/opcmodal
- Repository: https://github.com/Stephan075/opcmodal
- Homepage: https://github.com/Stephan075/opcmodal#readme
- Issues: https://github.com/Stephan075/opcmodal/issues
- npm.io page: https://npm.io/package/opcmodal

## Dependencies (8)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.1
- [create-component-lib](https://npm.io/package/create-component-lib.md) ^0.1.6
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^13.3.0
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.4
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.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

- 0.1.11 (latest) — 2022-08-30
- 0.1.10 — 2022-08-30
- 0.1.9 — 2022-08-30
- 0.1.8 — 2022-08-30
- 0.1.7 — 2022-08-30
- 0.1.6 — 2022-08-22
- 0.1.5 — 2022-08-01
- 0.1.4 — 2022-08-01
- 0.1.2 — 2022-08-01
- 0.1.1 — 2022-08-01
- 0.1.0 — 2022-08-01

## README

# Opcmodal

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Plugin modal pour le projet 14 :

Un modal react simple

1. [Installation](#Installation)
2. [Exemples d'utilisation](#Example)

## Installation

Vous pouvez installer Opcmodal avec npm :

```bash
npm install Opcmodal --save
```

Pour importer le modal :
`import { Modal } from "opcmodal";`

<div id='Example'>

## Exemples d'utilisation

```js
// react
import { useState } from "react";
import { Modal } from "opcmodal";

const MyComponent = () => {
  const [isOpen, setIsOpen] = useState(false);

  const openModal = () => {
    setIsOpen(true);
  };

  const closeModal = () => {
    setIsOpen(false);
  };

  return (
    <div onClick={openModal}>{isOpen && <Modal closeModal={closeModal} />}</div>
  );
};
```

### Type par défaut

```js
Modal.propTypes = {
  isOpen: PropTypes.bool,
  openModal: PropTypes.func,
  closeModal: PropTypes.func,
};
```

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