custom-modal-library-corentin
v1.0.0
Published
A simple custom modal component for React.
Downloads
2
Readme
custom-modal-library
A simple custom modal component for React.
Installation
Run the following command to install the library:
npm install custom-modal-library
Usage
import { CustomModal } from 'custom-modal-library';
const App = () => {
const [isOpen, setIsOpen] = React.useState(false);
return (
<>
<button onClick={() => setIsOpen(true)}>Open Modal</button>
<CustomModal isOpen={isOpen} onRequestClose={() => setIsOpen(false)}>
<h1>Modal Content</h1>
</CustomModal>
</>
);
};```