Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Youtube in React: VideoInfoBox show paragraphs
/* ... */
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
You can’t perform that action at this time.