Created
June 29, 2019 07:39
-
-
Save CITGuru/5f07d0173ac026c0918da13aea3520ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import PropTypes from 'prop-types' | |
import { | |
Modal, | |
ModalBackground, | |
ModalContent, | |
ModalClose, | |
Title | |
} from 'bloomer' | |
const CustomModal = ({ isActive, children, title, handleClose }) => { | |
return ( | |
<Modal isActive={isActive}> | |
<ModalBackground onClick={handleClose} /> | |
<ModalContent | |
style={{ backgroundColor: 'white', padding: '2rem', maxWidth: '100vw' }} | |
> | |
<Title isSize={6}>{title}</Title> | |
{children} | |
</ModalContent> | |
<ModalClose onClick={handleClose} /> | |
</Modal> | |
) | |
} | |
CustomModal.propTypes = { | |
children: PropTypes.element.isRequired, | |
title: PropTypes.string.isRequired, | |
isActive: PropTypes.bool.isRequired, | |
handleClose: PropTypes.func.isRequired | |
} | |
export default CustomModal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment