simple-modal-component-library

simple modal React component


Keywords
react, component, modal, ui
Install
npm install simple-modal-component-library@0.1.2

Documentation

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. Capture d’écran 2022-08-10 à 17 37 04

Capture d’écran 2022-08-10 à 17 38 06

Capture d’écran 2022-08-10 à 17 37 25

Style by default:(White)

modalw

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

showing

Whrite the logic to close the modal :

close

Use your component :

modal

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