employeehrnet

0.2.4 • Public • Published

ModalHRNet

A modal component for React applications.

Installation

You can install the ModalHRNet component via npm:

npm install employeehrnet

Usage

To use the ModalHRNet component in your React application, simply import it and use it in your code (exemple):

import React from 'react';
import { ModalEmployeeCreated } from 'employeehrnet';

function App() {
  const [isOpen, setIsOpen] = React.useState(false);

  const handleOpenModal = () => {
    setIsOpen(true);
  };

  const handleCloseModal = () => {
    setIsOpen(false);
  };

  return (
    <div>
      <button onClick={handleOpenModal}>Open Modal</button>
      <ModalEmployeeCreated isOpen={isOpen} onClose={handleCloseModal} />
    </div>
  );
}

export default App;

Props

The ModalHRNet component accepts the following props:

isOpen (boolean): Controls whether the modal is open or closed. onClose (function): Callback function to close the modal.

Readme

Keywords

none

Package Sidebar

Install

npm i employeehrnet

Weekly Downloads

0

Version

0.2.4

License

MIT

Unpacked Size

4.8 kB

Total Files

5

Last publish

Collaborators

  • jojoner16