1.0.0 • Published 2 years ago
react-modal-exercice v1.0.0
simple-modale-library
A library of React components created using create-react-app
.
Installation
Run the following command:npm install react-modal-exercice --force
.
For compatibility with Babel dependencies, we used react version 16.8. But no matter, it's working with react version 18.
Example App
import { Modal, useModal } from 'react-modal-exercice';
function App() {
const { isShowing, toggle } = useModal();
return (
<div className="App">
<div className="container">
<h1>Example Modale React</h1>
<button onClick={toggle}>Toggle Modal</button>
<Modal isShowing={isShowing} hide={toggle} />
</div>
</div>
);
}
export default App;
1.0.0
2 years ago