1.0.2 • Published 8 months ago
react-modal-babi v1.0.2
react-modal
Made with create-react-library
Install
npm i react-modal-babi
Usage
import React, { useState } from 'react';
import Modal from 'react-modal-babi';
function App() {
const [showModal, setShowModal] = useState(false);
const openModal = () => {
setShowModal(true);
};
const closeModal = () => {
setShowModal(false);
};
return (
<div>
<button onClick={openModal}>Open Modal</button>
<Modal show={showModal} onClickCloseBtn={closeModal}>
<h1>Hello, I'm a modal!</h1>
<p>This is some modal content.</p>
</Modal>
</div>
);
}
export default App;
License
MIT © blayres