# max-modal-component

> you can install max-modal-component with npm : `npm i max-modal-component`

Latest version **0.1.7** (published 2023-04-03) · 0 weekly downloads

## Install

```sh
npm install max-modal-component
pnpm add max-modal-component
yarn add max-modal-component
bun add max-modal-component
```

## 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.7 |
| Published | 2023-04-03 |
| First published | 2023-03-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | maximeg |

## Links

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

## 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
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.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

## Recent versions

- 0.1.7 (latest) — 2023-04-03
- 0.1.6 — 2023-04-03
- 0.1.5 — 2023-04-03
- 0.1.4 — 2023-03-22
- 0.1.3 — 2023-03-21
- 0.1.2 — 2023-03-21
- 0.1.1 — 2023-03-21
- 0.1.0 — 2023-03-20

## README

# Installation

you can install max-modal-component with npm :
`npm i max-modal-component`

# Usage

In react app, use : `import {Modal} from 'max-modal-component'`
and use : `<Modal close={Function} message={"your message"}>`

you can use this modal for form validation

# props

| Name          | Type              | Description                                         |
| --------------| -----------       | -----------                                         |
| props         | String or Boolean | props for modal                                     |
| message       | String            | props for show/change the message inside the modal  |
| close         | Boolean           | props for close the modal                           |


# example

```
import { Modal } from "max-modal-component" 
import { useState } from "react"

function Component(){
    const [modal, setModal] = useState(false)
    function closeModal(){
        setModal(false)
    }
    return(
        <div className="App">
            <button onClick={()=> setModal(true)} >Save</button>
            {modal === true ?<Modal close={closeModal} message={'Employee Created'}></Modal>: null}
        </div>
    )
}

export default Component
```

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