react-native-camera-roll-gallery
Version:
An easy and simple to use React Native component to render a custom layout for CameraRoll photos (next update will have videos) and displayed on a custom interactive image viewer for manipulation. Includes animations and support for both iOS and Android.
19 lines (16 loc) • 589 B
JavaScript
import React from "react";
import PropTypes from "prop-types";
export default class Header extends React.PureComponent {
static propTypes = {
renderPageHeader: PropTypes.func,
images: PropTypes.array.isRequired,
galleryIndex: PropTypes.number.isRequired,
onClose: PropTypes.func.isRequired
}
render() {
const { renderPageHeader, images, galleryIndex, onClose } = this.props;
const header = this.props.renderPageHeader &&
renderPageHeader(images[galleryIndex], galleryIndex, onClose);
return header;
}
}