import React from 'react'; import PropTypes from 'prop-types'; import Button from './Button.js'; const Footer = ({onClose, closeButtonText, actionButtonText, actionButtonClick, withButtons, children}) => { const closeBtnType = actionButtonClick ? 'secondary' : 'primary'; return (
{children} { withButtons &&
{actionButtonClick && }
}
); }; Footer.propTypes = { onClose: PropTypes.func, closeButtonText: PropTypes.string, actionButtonText: PropTypes.string, actionButtonClick: PropTypes.func, withButtons: PropTypes.bool, children: PropTypes.node }; Footer.defaultProps = { closeButtonText: 'Close', withButtons: true }; export default Footer;