import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; export default class ModalContent extends PureComponent { static propTypes = { title: PropTypes.string, description: PropTypes.string, }; render() { const { title, description } = this.props; return (
{title &&
{title}
} {description && (
{description}
)}
); } }