Created
May 28, 2020 16:54
-
-
Save jordanell/f646108140645edda3214391ed84d8ad to your computer and use it in GitHub Desktop.
React to Markdown sandbox component
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 PropTypes from "prop-types"; | |
import React from "react"; | |
class Sandbox extends React.Component { | |
static propTypes = { | |
component: PropTypes.func.isRequired | |
}; | |
render() { | |
const { component: Component } = this.props; | |
return ( | |
<React.Fragment> | |
<Component /> | |
</React.Fragment> | |
); | |
} | |
} | |
export default Sandbox; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment