# react_modal_for_hrnet

> Juste une modale

Latest version **1.1.0** (published 2023-04-24) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-04-24 |
| First published | 2023-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anthony MARCELLIN |
| Maintainers | thecreativedev |
| Keywords | react, modal |

## Links

- npm: https://www.npmjs.com/package/react_modal_for_hrnet
- npm.io page: https://npm.io/package/react_modal_for_hrnet

## 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

- 1.1.0 (latest) — 2023-04-24
- 1.0.9 — 2023-04-24
- 1.0.8 — 2023-04-24
- 1.0.5 — 2023-04-24
- 1.0.4 — 2023-04-24
- 1.0.3 — 2023-04-24
- 1.0.2 — 2023-04-24
- 1.0.1-a — 2023-04-24
- 1.0.1 — 2023-04-23
- 1.0.0 — 2023-04-23

## README

# Modal Component
A simple and customizable React component for creating modals.

## Installation
You can install the package using npm:

```bash
npm install react_modal_for_hrnet
```
Usage
Import the Modal component in your React application:

```jsx
import Modal from "react_modal_for_hrnet";
```
Then, use it in your React component:

```jsx
function App() {
    // Declare an React State
    const [modalOpen, setModalOpen] = useState(false);
    // Declare an callback function to change the state value
    const handleModalClose = () => {
        setModalOpen(false);
    };

    return (
        <>
            <Modal isOpen={modalOpen} closeModal={handleModalClose}>
                <h2>Hello World!</h2>
                <p>This is a sample modal.</p>
            </Modal>
        </>
    )
}
````
### Props
The **\`Modal\`** component takes three props:

**\`isOpen\`** (required)
A boolean value that determines whether the modal is open or closed.

**\`closeModal\`** (required)
A function that will be called when the user clicks on the close button or outside of the modal.

**\`children\`** (optional)
Any valid React component or HTML element to be displayed inside the modal.

### Customization
You can customize the styles of the modal by adding your own CSS rules to the **\`.modal\`**, **\`.modal-content\`**, .**\`modal-header\`**, **\`.modal-body\`**, and **\`.modal-btn\`** classes in your application's CSS file.

### License
This project is licensed under the MIT License. See the LICENSE file for details.

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