Last active
November 4, 2018 16:02
-
-
Save productioncoder/9c9db49f69494b5d612bb7eaef9a62ee to your computer and use it in GitHub Desktop.
Youtube in React: VideoInfoBox show paragraphs
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
/* ... */ | |
export class VideoInfoBox extends React.Component { | |
render() { | |
if (!this.props.video) { | |
return <div/>; | |
} | |
const descriptionParagraphs = this.getDescriptionParagraphs(); | |
const {descriptionTextClass, buttonTitle} = this.getConfig(); | |
return ( | |
{/*...*/} | |
<div className="video-info"> | |
<div className='channel-name'>Channel Name</div> | |
<div className='video-publication-date'>Thu 24, 2017</div> | |
</div> | |
<Button color='youtube'>91.5K Subscribe</Button> | |
<div className="video-description"> | |
<div className={descriptionTextClass}> | |
{descriptionParagraphs} | |
</div> | |
<Button compact onClick={this.onToggleCollapseButtonClick}>{buttonTitle}</Button> | |
</div> | |
{/*...*/} | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment