# hrnet_component_plugin_modal

> Modal component for tp_oc

Latest version **1.4.6** (published 2022-11-19) · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.6 |
| Published | 2022-11-19 |
| First published | 2022-11-10 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thierry.Friedrich |
| Maintainers | thierry57 |
| Keywords | react, components, modal |

## Links

- npm: https://www.npmjs.com/package/hrnet_component_plugin_modal
- Repository: https://github.com/Nanosor57GIT-HUB/HRnet_P14_plugin_modal
- Homepage: https://github.com/Nanosor57GIT-HUB/HRnet_P14_plugin_modal#readme
- Issues: https://github.com/Nanosor57GIT-HUB/HRnet_P14_plugin_modal/issues
- npm.io page: https://npm.io/package/hrnet_component_plugin_modal

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

- 1.4.6 (latest) — 2022-11-19
- 1.4.5 — 2022-11-19
- 1.4.4 — 2022-11-19
- 1.4.3 — 2022-11-19
- 1.4.2 — 2022-11-18
- 1.4.1 — 2022-11-18
- 1.4.0 — 2022-11-18
- 1.3.9 — 2022-11-18
- 1.3.8 — 2022-11-18
- 1.3.7 — 2022-11-18
- 1.3.6 — 2022-11-18
- 1.3.5 — 2022-11-18
- 1.3.4 — 2022-11-18
- 1.3.3 — 2022-11-18
- 1.3.2 — 2022-11-18
- … 30 more at https://npm.io/package/hrnet_component_plugin_modal/versions

## README

### Install

Install from terminal `npm i hrnet_component_plugin_modal`

### Usage

For the Modal components open button (for exemple):<br/>
`import ButtonOpenModal from 'ButtonOpenModal'`

### Exemple

`import React from "react";`<br/>
`import { Modal } from "hrnet_component_plugin_modal";`<br/>
`import { useState } from "react";`<br/>
<br/>
`const ButtonOpenModal = () => {`<br/>
 ` const [modalState, setModalState] = useState(false);`<br/>
<br/>
 ` function openModal() {`<br/>
   ` setModalState(!modalState);`<br/>
  `}`<br/>
<br/>
`  return (`<br/>
`    <div className="header-container">`<br/>
`      <button`<br/>
`        type="button"`<br/>
`        className="toggleModal nav-link"`<br/>
`        onClick={openModal}`<br/>
`      >`<br/>
`        Click-Me !`<br/>
`      </button>`<br/>
`      <Modal toggle={modalState} action={openModal} />`<br/>
`    </div>`<br/>
`  );`<br/>
`};`<br/>
<br/>
`export default ButtonOpenModal;`

### Use Modal
In a React app, use the Modal components in App.js:<br/>
`import Modal from 'hrnet_component_plugin_modal/dist/component/Modal`<br/>
<br/>
Insert:<br/>
`<Modal />`


### Close/Image

For the "closing and image" image, import an svg in an images folder in public and rename `closeModal.svg` and `imgModal.svg`

### Editable project

 The editable project can be retrieved from github                   |
Link: [Modal plugin](https://github.com/Nanosor57GIT-HUB/HRnet_P14_plugin_modal)

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