Created
May 20, 2018 19:31
-
-
Save hackingbeauty/b6a55acd344a3124d563bc4b5202ab23 to your computer and use it in GitHub Desktop.
ModalBody component for a large-scale React application as taught in the course "How To Write A Single Page Application" - www.singlepageapplication.com
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, { Component } from 'react' | |
import PropTypes from 'prop-types' | |
import { styles } from './styles.scss' | |
import { Modal as ReactBootstrapModal } from 'react-bootstrap' | |
class ModalBody extends Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { | |
const { children } = this.props | |
return ( | |
<div className={styles}> | |
<ReactBootstrapModal.Body> | |
{children} | |
</ReactBootstrapModal.Body> | |
</div> | |
) | |
} | |
} | |
ModalBody.propTypes = { | |
children: PropTypes.node.isRequired | |
} | |
export default ModalBody |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment