
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-p-modal
Advanced tools
A lightweight and customizable React popup component with a confirm button.
You can install react-p-modal using npm or yarn:
npm install react-p-modal --save
Or
yarn add react-p-modal
Import the module into your project like this :
import React, { useState } from "react";
import Popup from "react-p-modal";
const App = () => {
const [showPopup, setShowPopup] = useState(false);
const handleClose = () => {
setShowPopup(false);
// Additional close functionality if needed
};
const handleConfirm = () => {
// Handle confirm action
setShowPopup(false);
};
return (
<div>
{/* Your other components */}
<button onClick={() => setShowPopup(true)}>Open Popup</button>
<Popup
open={showPopup}
onClose={handleClose}
onConfirm={handleConfirm}
title="Thanks for your review"
description="I always felt like I could do anything. That’s the main thing people are controlled by! Thoughts- their perception of themselves! They're slowed down by their perception of themselves..."
confirmButton="Confirm"
closeButton="Close"
/>
</div>
);
};
export default App;
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
open | boolean | Yes | - | Controls whether the popup is open or closed. |
onClose | function | Yes | - | Callback function when the close button is clicked or when the backdrop is clicked to close the popup. |
onConfirm | function | Yes | - | Callback function when the confirm button is clicked. |
title | string | No | "Thanks for your review" | The title of the popup. |
description | string | No | - | The description/content of the popup. |
confirmButton | string | No | "Confirm" | The text to display on the confirm button. |
closeButton | string | No | "Close" | The text to display on the close button. |
addConfirm | boolean | No | true | Controls whether to display the Confirm button. |
addCancel | boolean | No | true | Controls whether to display the Cancel button. |
These props allow users to customize the behavior and content of the Popup component according to their requirements. Make sure to provide the appropriate data types and default values when using the component.
FAQs
A lightweight and customizable React popup component with a confirm button.
We found that react-p-modal 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.