0.18.3 • Published 1 year ago

react-popup-pro v0.18.3

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

React Popup Pro

react-popup-pro is a package that tries to simplify popup in ReactJS

Features

  • Complete CSS override option.
  • Multiple buttons and multiple functions as arguments for the button clicks.
  • Ability to use your component in the popup
  • Simplicity

Installation

react-popup-pro requires ReactJS to work

npm i react-popup-pro

Usage

Import Package

import Popup from 'react-popup-pro'

create getter and setter to use as trigger for popup

const [isPopup,setPopup]=useState(true);

Usage in jsx

<Popup isPopup={isPopup} setIsPopup={setIsPopup} message={'Add some Message'} />

Props

Property NameDescription
messageDisplay the message of Popup
isPopupTo Display Popup (isPopup = true or false)
setIsPopupTo handle closing of popup
componentTo render your own component in the Popup ( component = { < YourComponent /> }
buttonCountTo specify the number of buttons needed in the popup. By default it will be buttonCount={1}
buttonTextTo Change text of buttons.(buttonText={'TEST'}) If you have specified multiple buttons in buttonCount. Then pass the names as array (buttonText={'TEST1','TEST2',..})
buttonActionsTo specify respective function calls for the button clicks. By default the renedered button will act as closePopup action. You can pass multiple functions as an array if you want multiple functions( buttonActions={func1,func2,...} )
overrideOuterContainerClassNameTo override Popup outer container's class so that you can write your own css
overrideInnerContainerClassNameTo override Popup Inner container's class so that you can write your own css
overrideMessageContainerClassNameTo override Message container's class so that you can write your own css
overrideButtonContainerClassNameTo override Buttons container's class so that you can write your own css
overrideButtonClassNameTo override button class so that you can write your own css

License

MIT

0.18.3

1 year ago

0.18.2

1 year ago

0.12.1

1 year ago

0.12.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.3.0

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago