modal-react-gautha
v1.0.1
Published
Plugin Modal Project 14
Downloads
1
Readme
Modal
This plugin is for the project 14 from OpenClassrooms formation "Front-End".
How to install ?
npm i modal-react-gautha
How to use ?
- Import the plugin in your project like this :
import Modal from "modal-react-gautha";
- The state :
const [displayModal, setDisplayModal] = useState(false);
- In the return :
<Modal key={modalReset} id="You-modal-id" showModal={displayModal} closeModal={() => setDisplayModal(false)} parameter={modalParameter} message="Your message" />
Customize you modal
- 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"
}