import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ModalBase, { withModalState } from '../base/component'; import Button from '/imports/ui/components/button/component'; import styles from './styles.scss'; import cx from 'classnames'; const propTypes = { title: PropTypes.string.isRequired, confirm: PropTypes.shape({ callback: PropTypes.func.isRequired, label: PropTypes.string.isRequired, description: PropTypes.string, }), dismiss: PropTypes.shape({ callback: PropTypes.func, label: PropTypes.string.isRequired, description: PropTypes.string, }), }; const defaultProps = { shouldCloseOnOverlayClick: false, confirm: { label: 'Done', description: 'Saves changes and closes the modal', }, dismiss: { label: 'Cancel', description: 'Disregards changes and closes the modal', }, }; class ModalFullscreen extends Component { handleAction(name) { const action = this.props[name]; this.props.modalHide(action.callback); } render() { const { title, confirm, dismiss, className, modalisOpen, ...otherProps, } = this.props; return (

{title}

{this.props.children}
); } }; ModalFullscreen.propTypes = propTypes; ModalFullscreen.defaultProps = defaultProps; export default withModalState(ModalFullscreen);