Skip to content

Instantly share code, notes, and snippets.

@hackingbeauty
Created May 20, 2018 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hackingbeauty/b6a55acd344a3124d563bc4b5202ab23 to your computer and use it in GitHub Desktop.
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
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