import React, { Component } from 'react' import PropTypes from 'prop-types' export default class PageContainerHeader extends Component { static propTypes = { title: PropTypes.string.isRequired, subtitle: PropTypes.string, onClose: PropTypes.func, showBackButton: PropTypes.bool, onBackButtonClick: PropTypes.func, backButtonStyles: PropTypes.object, backButtonString: PropTypes.string, }; renderHeaderRow () { const { showBackButton, onBackButtonClick, backButtonStyles, backButtonString } = this.props return showBackButton && (
{ backButtonString || 'Back' }
) } render () { const { title, subtitle, onClose } = this.props return (
{ this.renderHeaderRow() }
{title}
{subtitle}
onClose()} />
) } }