# @tim-jn/react-modal

> A react modal for submit

Latest version **2.1.0** (published 2022-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tim-jn/react-modal
pnpm add @tim-jn/react-modal
yarn add @tim-jn/react-modal
bun add @tim-jn/react-modal
```

## 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 | 2.1.0 |
| Published | 2022-01-17 |
| First published | 2022-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tim-jn |
| Maintainers | tim-jn |
| Keywords | react, modal, submit |

## Links

- npm: https://www.npmjs.com/package/@tim-jn/react-modal
- Repository: https://github.com/Tim-jn/TimothyJeanmart_14_07012022_React_modal
- Homepage: https://github.com/Tim-jn/TimothyJeanmart_14_07012022_React_modal#readme
- Issues: https://github.com/Tim-jn/TimothyJeanmart_14_07012022_React_modal/issues
- npm.io page: https://npm.io/package/@tim-jn/react-modal

## Dependencies (11)

- [react](https://npm.io/package/react.md) ^17.0.2
- [core-js](https://npm.io/package/core-js.md) ^3.20.2
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2
- [prop-types](https://npm.io/package/prop-types.md) ^15.8.1
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.3
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.0
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1
- [@babel/runtime-corejs3](https://npm.io/package/@babel/runtime-corejs3.md) ^7.16.8
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^12.1.2
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.1
- [@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

- 2.1.0 (latest) — 2022-01-17
- 2.0.2 — 2022-01-13
- 2.0.1 — 2022-01-13
- 2.0.0 — 2022-01-13
- 1.2.4 — 2022-01-13
- 1.2.3 — 2022-01-13
- 1.2.2 — 2022-01-13
- 1.2.1 — 2022-01-13
- 1.2.0 — 2022-01-13
- 1.1.1 — 2022-01-12
- 1.1.0 — 2022-01-12
- 1.0.9 — 2022-01-12
- 1.0.8 — 2022-01-12
- 1.0.7 — 2022-01-12
- 1.0.6 — 2022-01-12
- … 7 more at https://npm.io/package/@tim-jn/react-modal/versions

## README

# @Tim-jn/react-modal

Responsive modal dialog component for React.

## Installation

To install, you can use [npm](https://npmjs.org/) or [yarn](https://yarnpkg.com):

    $ npm install @tim-jn/react-modal
    $ yarn add @tim-jn/react-modal

  - Use `<Modal>` tag inside your React app.

## Exemple

  - [Live demo](https://wealthhealth.netlify.app/)

```jsx

import { Modal } from '@tim-jn/react-modal/dist'
import React from 'react'

export default function Form() {
  window.React = React

  const [isValid, setIsValid] = useState(false)
  
  const handleModalResponse = () => {
    setIsValid(false)
  }

  const handleAddFormSubmit = (e) => {
    e.preventDefault()
    setIsValid(true)
  }

  return (
    <section className="formContent">
      <h2 className="formTitle">Create Employee</h2>
      <form className="form" onSubmit={handleAddFormSubmit}>
        (...)
      </form>
      {isValid ? <Modal text="Employee Created !" handleResponse={handleModalResponse} /> : ''}
    </section>
  )
}

```

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