React modal library by Thomas Thivolet
npm install react-modal-library-thomas-thivoletbash
npm i react-modal-library-thomas-thivolet
`
Usage
In your App.jsx file
`jsx
import React from "react"
import { Modal, useModal } from "react-modal-library-thomas-thivolet"
//Create your own component modal content
import MyComponentContent from " your path "
const App = () => {
// Declare useModal hook
const { isShowing, toggle } = useModal();
return (
} isShowing={isShowing} toggle={toggle}/>
)
}
`
MyComponentContent.jsx file
`jsx
import React from "react"
const MyComponentContent = () => {
return(
My modal content
)
}
export default MyComponentContent
``