oldschoolshuffle
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
//FeaturedPost.js | |
import React, { Component } from 'react'; | |
import './FeaturedPost.css'; | |
import Typography from '@material-ui/core/Typography'; | |
import Paper from '@material-ui/core/Paper'; | |
import Author from './Author'; | |
class FeaturedPost extends Component { | |
createMarkup(htmlString){ | |
return {__html: htmlString} | |
} | |
render() { | |
return ( | |
<div className="FeaturedPost"> | |
<Paper> | |
<Typography variant="headline" component="h3"> | |
{this.props.post.title} | |
</Typography> | |
<Author authorName={this.props.post.metadata.author.title} avatarImageSrc={this.props.post.metadata.author.metadata.avatarimage.url}/> | |
<div className="content" dangerouslySetInnerHTML={this.createMarkup(this.props.post.content)}> | |
</div> | |
<button className="playArtist">Play Discography</button> | |
</Paper> | |
</div> | |
); | |
} | |
} | |
export default FeaturedPost; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment