p5.js-web-editor/client/modules/IDE/components/Preview.js

21 lines
392 B
JavaScript
Raw Normal View History

2016-06-24 00:29:55 +02:00
import React from 'react';
class Preview extends React.Component {
componentDidMount() {
}
render() {
return (
<div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.0/p5.min.js"></script>
<script type="text/javascript">
{this.props.content}
</script>
</div>
);
}
}
export default Preview;