hrnet-employee-form
v1.0.3
Published
A React component library for employee forms
Downloads
100
Readme
// README.md
Modal Component
A customizable React modal component.
Installation
npm i hrnet-employee-form
Usage
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;
Props
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.
License
MIT