Licence
—
Version
0.1.2
Deps
8
Size
5 kB
Vulns
0
Weekly
5
Simple modal react component library
npm package : https://www.npmjs.com/package/simple-modal-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.



Style by default:(White)

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 : \

Whrite the logic to close the modal :

Use your component :

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