plugin_modal_p14
v1.0.22
Published
<br /> <div align="center"> <h3 align="center">Plugin Modal Project 14</h3>
Downloads
7
Readme
Built With
This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
- [![React][React.js]][React-url]
Installation
npm install --save plugin_modal_p14
Usage
Import the element inside the component you want, import useEffect from react
The openModal function will open the modal for you
Exemple:
import Modal from 'plugin_modal_p14'
import { useEffect } from 'react'
function Yourfunction() {
useEffect(() => {
let containerModal = document.getElementById('containerModal');
containerModal.style.display = 'none';
}, []);
const openModal = () => {
let containerModal = document.getElementById('containerModal');
containerModal.style.display = 'block';
}
return (
<div>
<Modal text={"text will be display"}/>
<button onClick={() => openModal()}>Open modal</button>
<div>
)
}
Contact
Thomas Robveille - [email protected]
Plugin Modal Project 14: https://github.com/ThomasRobveille/plugin_modal_p14