// README.md
A customizable React modal component.
npm i hrnet-employee-form
import React, { useState } from 'react';
import { Modal } from 'hrnet-employee-form';
const App = () => {
const [isOpen, setIsOpen] = useState(false);
return (
<div>
<button onClick={() => setIsOpen(true)}>Open Modal</button>
<Modal isOpen={isOpen} onClose={() => setIsOpen(false)}>
<p>This is the modal content!</p>
</Modal>
</div>
);
};
export default App;
-
isOpen
(boolean): Controls whether the modal is displayed. -
onClose
(function): Callback function to close the modal. -
children
(React.ReactNode): Content to be displayed inside the modal.
MIT