# modal-maker

> This is a componant react to display in full screen or hide a modal according to the submit.

Latest version **0.1.5** (published 2023-04-17) · 0 weekly downloads

## Install

```sh
npm install modal-maker
pnpm add modal-maker
yarn add modal-maker
bun add modal-maker
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-04-17 |
| First published | 2023-04-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | damienpellet |
| Keywords | modal, react, front-end, react-component |

## Links

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

## Dependencies (7)

- [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
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^13.4.0
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.5
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.0

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

- 0.1.5 (latest) — 2023-04-17
- 0.1.4 — 2023-04-15
- 0.1.3 — 2023-04-11
- 0.1.2 — 2023-04-11
- 0.1.1 — 2023-04-11
- 0.1.0 — 2023-04-11

## README

# What is it?

This is a componant react to display in full screen or hide a modal 
according to the submit.

## Install

```bash
npm i modal-maker
```

## Usage

After installing the package, import useState and ModalMaker

```jsx
import { useState } from 'react'
```
 
Then copy/past this hook into the parent component of this modal:

```jsx
    const [isModalOpen, setIsModalOpen] = useState(false)
```

component usage

```jsx
    <MyComponent isOpen = {isModalOpen} closeModal= {closeModal}/>
```


Example of use:

```jsx
    import React, { Component, useState } from 'react'

    import MyComponent from 'react-modal'

    function Exemple() {
        
        const [isModalOpen, setIsModalOpen] = useState(false)
        
        function openModal(){
        setIsModalOpen(true);
        }

        function closeModal(e){
        e.preventDefault();
        setIsModalOpen(false)
        } 

        return(
            <MyComponent isOpen = {isModalOpen} closeModal= {closeModal}/>
        )
    }
```

## License

MIT © [damienpellet](https://github.com/BlackBones94)

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