/MarilyneDestombes_14_modal_plugin

conversion d'un plugin jQuery en un composant React

Primary LanguageJavaScript

A simple Modal React component Plugin

Description

Here is a plugin made using npm publish to store a reusable react modal component.

How to install ?

npm i marilyne-simplemodal-react

How to use ?

  1. Import the plugin in your project :
import ModalPlugIn from "marilyne-simplemodal-react";

There are three properties :

-modalVisible : boolean,true or false

-mainTexT :string

-childrenText : string if you want to add comments

  1. Example of a jsx code to call the external component :
<ModalPlugIn
  modalVisible={true}
  mainTexT={"Main text !"}
  childrenText={"additional information"}
/>

Default css

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 2px solid #355506;
    border-radius: 10px;
    width: 60%; /* Could be more or less, depending on screen size */
  }

You can custom style by editing the default css.

Author of this plugin :

Marilyne DESTOMBES, student at OpenClassRooms