import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import ReactModal from 'react-modal'; import {FormattedMessage} from 'react-intl'; import Box from '../box/box.jsx'; import Button from '../button/button.jsx'; import CloseButton from '../close-button/close-button.jsx'; import backIcon from '../../lib/assets/icon--back.svg'; import helpIcon from '../../lib/assets/icon--help.svg'; import styles from './modal.css'; const ModalComponent = props => (
{props.onHelp ? (
) : null}
{props.headerImage ? ( ) : null} {props.contentLabel}
{props.fullScreen ? ( ) : ( )}
{props.children}
); ModalComponent.propTypes = { children: PropTypes.node, className: PropTypes.string, contentLabel: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]).isRequired, fullScreen: PropTypes.bool, headerClassName: PropTypes.string, headerImage: PropTypes.string, isRtl: PropTypes.bool, onHelp: PropTypes.func, onRequestClose: PropTypes.func, scrollable: PropTypes.bool }; export default ModalComponent;