const bindAll = require('lodash.bindall'); const PropTypes = require('prop-types'); const React = require('react'); const Video = require('../video/video.jsx'); require('./video-preview.scss'); class VideoPreview extends React.Component { constructor (props) { super(props); bindAll(this, [ 'handleShowVideo' ]); this.state = { videoOpen: false }; } handleShowVideo () { this.setState({videoOpen: true}); } render () { return (
{this.state.videoOpen ? (
); } } VideoPreview.propTypes = { buttonMessage: PropTypes.string.isRequired, thumbnail: PropTypes.string.isRequired, thumbnailHeight: PropTypes.string, thumbnailWidth: PropTypes.string, videoHeight: PropTypes.string, videoId: PropTypes.string.isRequired, videoWidth: PropTypes.string }; module.exports = VideoPreview;