react-modal-p14-sebastien-d

1.0.1 • Public • Published

Modal P14 - Sebastien D

Description

This plugin is for the project 14 from OpenClassrooms formation "Front-End".

How to install ?

npm i react-modal-p14-sebastien-d

How to use ?

  1. Import the plugin in your project like this :
import Modal from "react-modal-p14-sebastien-d";
  1. The state :
const [displayModal, setDisplayModal] = useState(false);
  1. In the return :
<Modal key={modalReset} id="modal-created" showModal={displayModal} closeModal={() => setDisplayModal(false)} parameter={modalParameter} message="Employee Created !" />

Personalize

  1. Put this into your component :
const modalParameter = {
	"backgroundColor": "#EEEEEE",   
	"borderRadius": 10,
	"boxShadow": "0 0 5px #1B1919",
	"color": "#1B1919",
	"fontSize": 18,
	"height": "fit-content",
	"padding": "20px 50px",
	"width": "fit-content"
}

Package Sidebar

Install

npm i react-modal-p14-sebastien-d

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

4.39 kB

Total Files

5

Last publish

Collaborators

  • sebastiend1