0.1.5 • Published 6 months ago

@r.cochin/modal-react v0.1.5

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

@r.cochin/modal-react - A Simple React Modal Component Library

A library of React components created using create-react-app.

Installation

Run the following command:

npm install "@r.cochin/modal-react"

Usage

To use the Modal component in your React application, you can import it as shown below:

import Modal from '@r.cochin/modal-react';

Parameters

Here are the props you can pass to the Modal component:

  • isOpen (boolean): Determines if the modal is open or closed. Default is false.

  • autoClose (boolean): Determines if the modal should automatically close after a certain duration. Default is false.

  • autoCloseDuration (number): Specifies the duration (in milliseconds) after which the modal should automatically close. Default is 3000 (3 seconds).

  • onClose (function): A callback function that is called when the modal is closed.

  • color (string): Specifies the background color of the modal. Default is 'white'.

  • border (string): Specifies the border-radius of the modal. Default is '5px'.

Callbacks

  • onClose: This function is called when the modal is closed. Useful for performing actions like resetting form states or logging.
0.1.5

6 months ago

0.1.4

6 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago