Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
popup-react
Advanced tools
popup-react
is a lightweight collection of React components designed to enhance user experience. Currently, it features the ImageQuickView
component, with more components planned for future releases.
To install the package, run the following command:
npm install popup-react
or using yarn:
yarn add popup-react
ImageQuickView
allows users to quickly view a larger version of an image in a modal popup. It enhances the browsing experience for image-heavy applications such as e-commerce websites or galleries.
import { useState } from 'react'
import sea from './assets/sea.jpg'
import { ImageQuickView } from 'popup-react'
function App() {
const [selectedImage, setSelectedImage] = useState<string | undefined>(undefined);
const closeQuickView = () => {
setSelectedImage(undefined);
}
return (
<div>
<img
src={sea}
onClick={() => setSelectedImage(sea)}
/>
<ImageQuickView
src={selectedImage}
alt={"image alt"}
bgWrapper={true}
isVisible={!!selectedImage}
onClose={closeQuickView}
/>
</div>
)
}
export default App
src
: (string) Required. The URL of the image to be displayed in the quick view.alt
: (string) Optional. The alt text for the image.bgWrapper
: (boolean) Optional. Show or hide background wrapper. (default: true)isVisible
: (boolean) Optional. Show or hide the quick view. (default: false)onClose
: (function) Required. Callback function triggered when the modal is closed.const closeQuickView = () => {
setSelectedImage(undefined);
}
<ImageQuickView
src={selectedImage}
alt={"image alt"}
bgWrapper={true}
isVisible={!!selectedImage}
onClose={closeQuickView}
/>
We plan to extend popup-react
with more utility-focused components that integrate seamlessly into modern React applications.
This project is licensed under the MIT License.
FAQs
A collection of beautiful popup components for react.
The npm package popup-react receives a total of 2 weekly downloads. As such, popup-react popularity was classified as not popular.
We found that popup-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.