0.1.3 • Published 2 years ago
webnum-modal-react v0.1.3
webnum-modal-react
A library of React components created using create-react-app
.
Installation
Run the following command:
npm i webnum-modal-react
How to
First you need to import the Modal :
import { Modal } from 'webnum-modal-react';
Then you can use the component :
- Declare
const [show, setShow] = useState(false);
- Integrate
<Modal onClose={() => setShow(false)} show={show}> <p>Your content !</p> </Modal>
- Activate
<button onClick={() => setShow(true)}>Show Modal</button>