import React, { PropTypes } from 'react'; import InlineSVG from 'react-inlinesvg'; import { browserHistory } from 'react-router'; const exitUrl = require('../../../images/exit.svg'); class Overlay extends React.Component { constructor(props) { super(props); this.close = this.close.bind(this); } componentDidMount() { this.overlay.focus(); } close() { if (!this.props.closeOverlay) { browserHistory.push(this.props.previousPath); } else { this.props.closeOverlay(); } } render() { const { ariaLabel, title, children } = this.props; return (