@team-devmonster/react-native-img-viewer
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

@team-devmonster/react-native-img-viewer

This is react-native simple image viewer. You can edit bottom close button style whatever you want to.

author: devmonster

We are always looking for investment or assistance.
hompage: https://devmonster.co.kr
email: aldegad@devmonster.co.kr

items

  • [o] [ImgViewer]

Getting started

install prev libraries
$ npm install react-native-safe-area-context react-native-reanimated react-native-gesture-handler

install @team-devmonster/react-native-img-viewer
$ npm install @team-devmonster/react-native-tags@latest @team-devmonster/react-native-img-viewer@latest

Examples

Easy. Too Easy.

usage

// App.theme.tsx => You can use any file name :)
import React, { useState } from "react";
import { ImgViewer } from '@team-devmonster/react-native-img-viewer';

export const AnyComponent = () => {

  const [visible, setVisible] = useState(false);
  
  return (
    <ImgViewer
      visible={visible}
      onRequestClose={() => {
        setVisible(false);
      }}
      src={'https://anything'}
      closeText="close"
      closeButtonContainerStyle={{ backgroundColor: '#FF6420' }}
      closeButtonStyle={{ height: 44, color: '#ffffff' backgroundColor: '#FF6420' }}
    />
  )
  /** or */
  return (
    <ImgViewer
      visible={visible}
      onRequestClose={() => {
        setVisible(false);
      }}
      src={['https://anything','https://anything','https://anything','https://anything']}
      startIndex={1}
      closeText="close"
      closeButtonContainerStyle={{ backgroundColor: '#FF6420' }}
      closeButtonStyle={{ height: 44, color: '#ffffff' backgroundColor: '#FF6420' }}
    />
  )
}

Other react-native modules

Package Sidebar

Install

npm i @team-devmonster/react-native-img-viewer

Weekly Downloads

1

Version

1.0.6

License

MIT

Unpacked Size

31.9 kB

Total Files

20

Last publish

Collaborators

  • mtseo01
  • stmake22
  • aldegad