# simple-modal-component-library

> simple modal React component

Latest version **0.1.2** (published 2022-08-10) · 5 weekly downloads

## Install

```sh
npm install simple-modal-component-library
pnpm add simple-modal-component-library
yarn add simple-modal-component-library
bun add simple-modal-component-library
```

## 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.2 |
| Published | 2022-08-10 |
| First published | 2022-08-10 |
| Weekly downloads | 5 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | melcd238 |
| Maintainers | melcd238 |
| Keywords | react, component, modal, ui |

## Links

- npm: https://www.npmjs.com/package/simple-modal-component-library
- Repository: https://github.com/melcd238/library-react-modal-09082022
- Homepage: https://github.com/melcd238/library-react-modal-09082022#readme
- Issues: https://github.com/melcd238/library-react-modal-09082022/issues
- npm.io page: https://npm.io/package/simple-modal-component-library

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

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2022-08-10
- 0.1.1 — 2022-08-10
- 0.1.0 — 2022-08-10

## README

# Simple modal react component library
Simple Modal component React is a library that allows to create modals easily with 3 different styles: SUCCESS (green), ERROR (red) and DANGER (orange) and 1 style by default.
<img width="404" alt="Capture d’écran 2022-08-10 à 17 37 04" src="https://user-images.githubusercontent.com/46504445/183973294-4ac13548-b88a-430f-a609-33fa0754c02b.png">

<img width="404" alt="Capture d’écran 2022-08-10 à 17 38 06" src="https://user-images.githubusercontent.com/46504445/183973328-788ee7e6-c53a-4d65-bfc3-8e0685dab10a.png">

<img width="404" alt="Capture d’écran 2022-08-10 à 17 37 25" src="https://user-images.githubusercontent.com/46504445/183973343-ab529d80-4454-40c0-8202-23e7e763df1b.png">

 Style by default:(White)
 
<img width="404" alt="modalw" src="https://user-images.githubusercontent.com/46504445/183973373-4c7fcb79-e925-40c5-94b9-8265585a1a49.png">


## Install
npm install --save simple-modal-component-library 

## Usage

In React app, use Modal components : \
import  { Modal } from "simple-modal-component-library"

Whrite the logic to show or hide the modal : \ 



<img width="369" alt="showing" src="https://user-images.githubusercontent.com/46504445/183973475-7b87d5a3-bbd3-435b-9c93-ed88e197040d.png">

 

 Whrite the logic to close the modal : 



  <img width="222" alt="close" src="https://user-images.githubusercontent.com/46504445/183973500-be8f43e0-d19b-4e1f-9cc1-7c481495614c.png">


 Use your component :  



<img width="634" alt="modal" src="https://user-images.githubusercontent.com/46504445/183973521-9479cf2a-afad-41f8-9191-5e368c7770c6.png">

 ## Modal props 
 stylesModal (string): You have 3 possibilities SUCCESS, ERROR or DANGER to stylize  your modal, this props is optional. \
 closeModal (function) : logic to close modal \
 label (string) : text you want to display

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