import React, { Fragment } from 'react'
import PropTypes from 'prop-types'
import { translate } from 'react-i18next'
import classnames from 'classnames'
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'
export class PopupLayout extends React.Component {
static propTypes = {
className: PropTypes.string,
children: PropTypes.element.isRequired,
title: PropTypes.string,
showFooter: PropTypes.bool,
footer: PropTypes.element,
cancelText: PropTypes.string,
submitText: PropTypes.string,
submitColor: PropTypes.string,
onHide: PropTypes.func.isRequired,
onSubmit: PropTypes.func,
t: PropTypes.func.isRequired
};
hidePopup = () => {
this.props.onHide()
};
onSubmit = () => {
const { onSubmit } = this.props
onSubmit() && this.hidePopup()
};
getHeader () {
const { t, title = 'common:commonWords.Confirm' } = this.props
return (