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

{title}

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