UNPKG

react-native-image-layout

Version:

An easy and simple to use React Native component to render a custom masonry layout for remote/local images and displayed on a custom interactive image viewer. Includes animations and support for both iOS and Android. Free and made possible along with co

19 lines (16 loc) 566 B
import React from "react"; import PropTypes from "prop-types"; export default class PageHeader extends React.PureComponent { static propTypes = { renderPageHeader: PropTypes.func, image: PropTypes.object.isRequired, galleryIndex: PropTypes.number.isRequired, onClose: PropTypes.func.isRequired } render() { const { renderPageHeader, image, galleryIndex, onClose } = this.props; const header = renderPageHeader && renderPageHeader(image, galleryIndex, onClose); return header; } }