Created
February 15, 2019 11:57
-
-
Save dsc712/7ae0a46e798cafa9320f9b8effc2fefb to your computer and use it in GitHub Desktop.
Video List Item
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 React, { Component } from 'react'; | |
class VideoListItem extends Component { | |
render() { | |
const video = this.props.video; | |
const imageUrl = video.snippet.thumbnails.default.url; | |
return ( | |
<li onClick={ () => this.props.onUserSelected() } style={{ "border": "1px solid #efefef", "marginBottom": "3px", "borderRadius": "5px"}}> | |
<div> | |
<img src={ imageUrl } alt={ video.snippet.title }/> | |
<span style={{ "color": "#444"}}>{ video.snippet.title }</span> | |
</div> | |
</li> | |
); | |
} | |
} | |
export default VideoListItem; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment