1.7.1 • Published 6 years ago

rc-image-previewer v1.7.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

ImagePreviewer Build Statusnpmlicense

image-previewer-demo

Demo gif here if not loaded.

How to use

Install package:

npm install --save rc-image-previewer

Import to your app:

import ImagePreviewer from 'rc-image-previewer';

Use the component:

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

export default class App extends React.Component {
  render() {
    const ImgWidth = width;
    const ImgHeight = ImgWidth * 0.6;
    return (
      <View style={{
        flex: 1,
        backgroundColor: '#fff',
        alignItems: 'center',
        justifyContent: 'center',
      }}>
        <ImagePreviewer
          source={MountHuang}
          style={{
            width: ImgWidth,
            height: ImgHeight,
          }}
          resizeMode="stretch"
        />
      </View>
    );
  }
}

API

API table

API nameUsage
styleThe style of element.
sourceThe image source, same as source.
resizeModeThe image resize mode, default is contain.(Optional)
1.7.1

6 years ago

1.7.0

6 years ago

1.6.0

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.0

6 years ago