dragovic-modal-package

1.0.5 • Public • Published

modal-package

Npm package to add a react Modal component

Prerequisites

This project requires React and NPM. To make sure you have them available on your machine, try running the following command.

$ npm -v

Getting Started

These instructions will get you up and running on your local machine.

Installation

Here is the link of the npm folder: https://www.npmjs.com/package/dragovic-modal-package?activeTab=readme

Start with adding the package on your local machine:

$ npm install dragovic-modal-package

Usage

Import and setup the package

Import the package:

$ import { Modal } from 'dragovic-modal-package';

Add the state to control if the modal is visible or not ( Default to false ):

const [show, setShow] = useState(false);

Then add the modal component to the page:

<Modal title='' onClose={ ()=> setShow(false) } show={ show } />

Customization

You can change the content inside the modal by adding a title. Exemple:

<Modal title='Employee created' onClose={ ()=> setShow(false) } show={ show } />

Author

Readme

Keywords

Package Sidebar

Install

npm i dragovic-modal-package

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

155 kB

Total Files

4

Last publish

Collaborators

  • dragovic