@alantoa/lightbox
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

React Native Lightbox

basic usage

Todo

Installation

First you have to follow installation instructions of Reanimated v2 and react-native-gesture-handler v2

npm install @alantoa/lightbox

Usage

import { LightBoxProvider, LightBox } from '@alantoa/lightbox';
import { StyleSheet, Image, Dimensions } from 'react-native';
import * as React from 'react';

const { width } = Dimensions.get('window');

export default function App() {
  return (
    <LightBoxProvider>
      <LightBox
        width={width / 3}
        height={width / 3}
        imgLayout={{ width, height: width }}
      >
        <Image
          source={{
            uri: uri,
          }}
          style={StyleSheet.absoluteFillObject}
        />
      </LightBox>
    </LightBoxProvider>
  );
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i @alantoa/lightbox

Weekly Downloads

48

Version

0.3.1

License

MIT

Unpacked Size

102 kB

Total Files

33

Last publish

Collaborators

  • alantoa