projet-14-library
modal projet 14
library crated for the project 14 of OpenClassroom
Install
npm install --save projet-14-library
Usage
Put the element you want inside of the Modal element, your element behaves like a normal div, which you can entirely customize via css live your own divs. Only things added will be the cross permiting to exit the modal and the dark background. The open function will open the modal for you.
Exemple:
import modal from 'projet-14-library'
import 'projet-14-library/dist/index.css';
var {Modal, open} = modal
function Yourfunction() {
return (
<Modal><div id="Yourelement">content</div></Modal>
<button onClick={open}></button>
)
}
Exemple of the modal in action:
License
MIT © LascanTeki