1.3.0 • Published 5 years ago
react-native-photo-browse v1.3.0
react-native-photo-browse
Here is a browser page for multiple local or remote photos.
It supports:
- Multiple photos.
- Local image or remote url.
- Delete item.
- Save item to local.
- Image for placeholder or fail load.
- Orientation supported.
Install
Install by Yarn:
yarn add react-native-photo-browseInstall by NPM:
npm install --save react-native-photo-browseUsage
First import in the file:
import * as PhotoBrowser from 'react-native-photo-browse';Then call method in function:
func = () => {
const options = {
// ...options
};
PhotoBrowser.showPhotoBrowserPage(options);
}Options
| Name | Description |
|---|---|
| images | Image urls array to show |
| failImage | A placeholder image when image is invalid |
| currentIndex | Initial index of image to show. Default is 0 |
| loadingText | Loading tips |
| onClose | Callback method when close |
| supportedOrientations | Orientations supported for Modal |
| successDownloadText | DownLoad and Save success tips |
| cancelDownloadText | cancel DownLoad tips |
| clickdButtonIcon | clickdButton element |
| unClickdButtonIcon | unClickdButton element |
| closeIcon | stop download element |
| startDownload | to download picture |
Global Settings
You can change settings globally.
import {PhotoBrowserPage} from 'react-native-photo-browse';
PhotoBrowserPage.defaultProps.xxx = yyy;xxx is a key of options