You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-native-zoom-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-zoom-lightbox

## Demo

0.0.1
Source
npmnpm
Version published
Weekly downloads
12
-52%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-zoom-lightbox

Demo

iOS

Android

Getting started

$ npm install react-native-zoom-lightbox --save

Usage

SingleImage

import {SingleImage} from 'react-native-zoom-lightbox';

<SingleImage 
uri='https://avatars2.githubusercontent.com/u/31804215?s=40&v=4'
style={{}} />
Properties
PropTypeDescription
uristringUrl of image
styleobjectStyle of Image component

List Image

You need to wrap your container with a HOC named wrapperZoomImages to get the required props (see example.

import {wrapperZoomImages,ImageInWraper } from 'react-native-zoom-lightbox'

export default wrapperZoomImages(YourContainer);

Array of images must be saved at state named arrayImages.

  constructor(props){
    super(props);
    this.state={
      arrayImages : [
        {url:'example',
        },
        {url:'example' }],
    };
  }
   const {getOpacity,captureCarouselItem,indexState,open} = this.props;
   const {arrayImages} = this.state;
Usage
   <View style={{ flex:1,alignItems:'center' }}>
        {
          this.state.arrayImages.map((item,index) => 
            <ImageInWraper
            open={open}
            indexState={indexState}
            getOpacity={getOpacity}
            captureCarouselItem={captureCarouselItem}
            index={index}
            url={item.url}
            style={{marginBottom:20}}
            />
          )
        }
      </View>

or

     <View style={{ flex:1,alignItems:'center' }}>
        
            <ImageInWraper
            open={open}
            indexState={indexState}
            getOpacity={getOpacity}
            captureCarouselItem={captureCarouselItem}
            index={0}
            url={this.state.arrayImages[0].url}
            style={{marginBottom:20}}
            />
          
            <Text>Example</Text>

            <ImageInWraper
            open={open}
            indexState={indexState}
            getOpacity={getOpacity}
            captureCarouselItem={captureCarouselItem}
            index={1}
            url={this.state.arrayImages[1].url}
            style={{marginBottom:20}}
            />
      </View>
Properties

ImageInWraper

PropTypeRequiredDescription
uristringyesUrl of image
styleobjectnoStyle of Image component
indexnumberyesIndex of Image
captureCarouselItemfuncyesProps received from HOC
getOpacityfuncyesProps received from HOC
indexStatenumberyesProps received from HOC
openstringyesProps received from HOC

Example

Keywords

react-native

FAQs

Package last updated on 26 Jun 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.