forked from alwx/react-native-photo-view
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fully functional first version; updated README.md
- Loading branch information
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
Work in progress | ||
# react-native-photo-view | ||
|
||
Provides custom Image view for React Native that allows to perform | ||
pinch-to-zoom on images. | ||
*On iOS* it uses native Image wrapped in ScrollView; | ||
*On Android* it uses PhotoDraweeView. | ||
|
||
## Installation | ||
|
||
``` | ||
npm install --save git+https://[email protected]/alwx/react-native-photo-view | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
import React from 'react'; | ||
import { PropTypes } from 'react'; | ||
import { requireNativeComponent, View } from 'react-native'; | ||
|
||
import {NativeModules} from 'react-native'; | ||
export default NativeModules.PhotoView; | ||
var iface = { | ||
name: 'PhotoView', | ||
propTypes: { | ||
src: PropTypes.string, | ||
...View.propTypes // include the default view properties | ||
}, | ||
}; | ||
|
||
module.exports = requireNativeComponent('PhotoView', iface); |