Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-lightbox
Advanced tools
npm install --save react-native-lightbox
This module requires React Native 0.11 or later*
var Lightbox = require('react-native-lightbox');
var LightboxView = React.createClass({
render: function() {
return (
<Lightbox>
<Image
style={{ height: 300 }}
source={{ uri: 'http://knittingisawesome.com/wp-content/uploads/2012/12/cat-wearing-a-reindeer-hat1.jpg' }}
/>
</Lightbox>
);
},
});
The component exposes the open
and close
methods. Smack a ref
on the <Lightbox>
and you're good to go. This is probably quite useful if you're doing a custom header.
render: function() {
return (
<Lightbox ref="lightbox">…</Lightbox>
);
},
handleSomething: function() {
this.refs.lightbox.open();
}
Prop | Type | Description |
---|---|---|
activeProps | object | Optional set of props applied to the content component when in lightbox mode. Usable for applying custom styles or higher resolution image source. |
header | element | Custom header instead of default with X button |
onClose | function | Triggered when lightbox is closed |
onOpen | function | Triggered when lightbox is opened |
underlayColor | string | Color of touchable background, defaults to black |
swipeToDismiss | bool | Enables gestures to dismiss the fullscreen mode by swiping up or down, defaults to true . |
Check full example in the Example
folder.
MIT License. © Joel Arvidsson
FAQs
Images etc in Full Screen Lightbox Popovers for React Native
The npm package react-native-lightbox receives a total of 30,686 weekly downloads. As such, react-native-lightbox popularity was classified as popular.
We found that react-native-lightbox 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.