![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
react-chained-modals
Advanced tools
Allow you to add few chained modals or just single popup in your react app. Easy to use and customizing. Check the demo page
Get the package from npm
npm i react-chained-modals
Import:
import ChainedModal from "react-chained-modals";
import "react-chained-modals/src/modal.css"
import "animate.css"
then place:
<ChainedModal
animationNext="fadeInRight"
animationPrev="fadeInLeft"
visible={this.state.showModal}
onRequestClose={this.toggleModal}
closeOnBackground
animationSpeed="faster"
elements={[
{
component: Modal1,
props: { title: "First modal" }
},
{
component: Modal2,
props: { title: "Second modal" }
},
{
component: Modal3,
props: { title: "Third modal" }
}
]}
/>
Name | Type | Description | Default |
---|---|---|---|
animationNext | string | Transition animation on showNext method call. View full list here Animate.css. This method will call also on popup first view. | none |
animationPrev | string | Transition animation on showPrev method call. View full list here Animate.css | none |
visible | bool | Is modals visible. Options: true, false | false |
onRequestClose | function | Method that should set visible to false | |
closeOnBackground | bool | Should popup close on click at background. Options: true, false | false |
animationSpeed | string | Define it if you want to change the animation speed. Options: "slow", "slower", "fast", "faster" | none |
elements | array | Each item in the array should have the component that will show and optional parameter props which put all 'props' you want to use in this component | none |
In each component, that you added in elements
you can get next next properties and methods from props:
Name | Type | Description |
---|---|---|
closeChainedModal | function | The onRequestClose function will be called |
totalModals | number | Number of modals, length of array |
showNext | function | Show next modal function |
showPrev | function | Show prev modal function |
currentModal | number | Current modal, index in array |
const Modal1 = props => {
return (
<div>
{props.title} {props.currentModal}
<div>{props.totalModals}</div>
<div>
<span onClick={props.showPrev()}>Go prev </span>
<span onClick={props.showNext()}>Go next</span>
</div>
<button onClick={() => props.closeChainedModal()}>close modal</button>
</div>
);
};
Just replace your styles with styles from the module
FAQs
You can create one popup or few chained modals using this plugin
The npm package react-chained-modals receives a total of 6 weekly downloads. As such, react-chained-modals popularity was classified as not popular.
We found that react-chained-modals demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.