Skip to content

Instantly share code, notes, and snippets.

@dsc712
Created February 15, 2019 11:57
Show Gist options
  • Save dsc712/7ae0a46e798cafa9320f9b8effc2fefb to your computer and use it in GitHub Desktop.
Save dsc712/7ae0a46e798cafa9320f9b8effc2fefb to your computer and use it in GitHub Desktop.
Video List Item
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