Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
react-native-zoombox
Advanced tools
A zoomable Box for React Native
npm install --save react-native-zoombox
import ZoomBox from 'react-native-zoombox';
class ZoomBoxExample extends React.Component {
render() {
return (
<ZoomBox>
<Image
style = {{ flex: 1 }}
source = {{ uri: 'http://www.placehold.it/800x600' }} />
</ZoomBox>
);
}
}
Property | Type | Default | Description |
---|---|---|---|
backgroundColor | string | #000 | Background color of modal |
backgroundOpacity | float | 1 | Opacity of modal background |
underlayColor | string | #fff | Underlay color of touchable |
hideStatusBar | boolean | true | Fullscreen modal with hidden status bar (There is a Bug on Android with Modals, where a hidden StatusBar is not working correctly, see: RN Issue #7474) |
swipeToClose | boolean | false | Close modal on vertical or horizontal swipe (WIP works, but opacity does not change in both dimension) |
customHeader | function(closeAction) | NULL | Function, that returns markup for a custom header with invokes the closeAction |
customContent | function | children | Use different content in modal |
customAnimation | function(startValue, endValue) | NULL | Function, that returns custom animation for opening/closing the modal. Default: Animated.spring(startValue, {toValue: endValue, tension: 30, friction: 7}) |
inModalProps | object | null | Set different properties to content when in modal |
For more examples check the demo folder
This is an example for a custom header:
_customHeader(closeModal) {
return (
<TouchableHighlight onPress = {closeModal}>
<Text style = {styles.closeButton}>Close</Text>
</TouchableHighlight>
)
}
This is an example for a custom animation:
_customAnimation(startValue, endValue) {
return (
Animated.timing(
startValue,
{toValue: endValue, duration: 1000}
)
)
}
FAQs
Popover content with zoom animation for react native
The npm package react-native-zoombox receives a total of 0 weekly downloads. As such, react-native-zoombox popularity was classified as not popular.
We found that react-native-zoombox 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.