0.1.1 • Published 1 year ago

pg-react-modal v0.1.1

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

How to install

npm install pg-react-modal

Description

This library allows you to easily create a modal and customize it with parameters.

Usage

  • Start by importing the library
import { Modal } from "pg-react-modal";
  • Import the hook
import useModal from 'pg-react-modal/dist/hooks/useModal'
ParametersTypeDescription
isOpenBooleanDefines if the modal is open or not
actionButtonFunctionBind a function to the button
headerContentStringAdd a title to the modal
bodyContentStringAdd a message to the modal
HideFunctionBind the Toggle function on the parameter to close the modal
buttonContentStringAdd a text to the button
mainBackgroundStringAllows you to change the background color of the modal
modalBackgroundStringAllows you to change the color of the modal box background
buttonBackgroundStringAllows you to change the background color of the button
buttonColorStringAllows you to change the text color of the button