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.
@hamidfzm/react-native-image-viewing
Advanced tools
React Native modal component for viewing images as a sliding gallery
React Native modal component for viewing images as a sliding gallery.
Try with Expo: https://expo.io/@hamidfzm/react-native-image-viewing
yarn add @hamidfzm/react-native-image-viewing
or
npm install --save @hamidfzm/react-native-image-viewing
import ImageView from "@hamidfzm/react-native-image-viewing";
const images = [
{
uri: "https://images.unsplash.com/photo-1571501679680-de32f1e7aad4"
},
{
uri: "https://images.unsplash.com/photo-1573273787173-0eb81a833b34"
},
{
uri: "https://images.unsplash.com/photo-1569569970363-df7b6160d111"
}
];
const [visible, setIsVisible] = useState(false);
<ImageView
images={images}
imageIndex={0}
visible={visible}
onRequestClose={() => setIsVisible(false)}
/>;
Prop name | Description | Type | Required |
---|---|---|---|
data | Array of images to display | ReadonlyArray | true |
getImage | Function to extract image from data | (data: T) => ImageSource | true |
imageIndex | Current index of image to display | number | true |
visible | Is modal shown or not | boolean | true |
onRequestClose | Function called to close the modal | function | true |
onImageIndexChange | Function called when image index has been changed | function | false |
animationType | Animation modal presented with: default fade | none , fade , slide | false |
presentationStyle | Modal presentation style: default: fullScreen Android: Use overFullScreen to hide StatusBar | fullScreen , pageSheet , formSheet , overFullScreen | false |
backgroundColor | Background color of the modal in HEX (#000000EE) | string | false |
swipeToCloseEnabled | Close modal with swipe up or down: default true | boolean | false |
doubleTapToZoomEnabled | Zoom image by double tap on it: default true | boolean | false |
HeaderComponent | Header component, gets current imageIndex as a prop | component, function | false |
FooterComponent | Footer component, gets current imageIndex as a prop | component, function | false |
To start contributing clone this repo and then run inside react-native-image-viewing
folder:
yarn
Then go inside example
folder and run:
yarn & yarn start
This will start packager for expo so you can change /src/ImageViewing
and see changes in expo example app.
FAQs
React Native modal component for viewing images as a sliding gallery
We found that @hamidfzm/react-native-image-viewing 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.