Created
September 12, 2018 18:09
-
-
Save gate5th/16f109b08610485e8d74ed4027f3c044 to your computer and use it in GitHub Desktop.
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
//OtherPosts.js | |
import React, { Component } from 'react'; | |
import './OtherPosts.css'; | |
import ExpansionPanel from '@material-ui/core/ExpansionPanel'; | |
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'; | |
import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails'; | |
import Typography from '@material-ui/core/Typography'; | |
class OtherPosts extends Component { | |
render() { | |
return ( | |
<div className="OtherPosts"> | |
<ExpansionPanel> | |
<ExpansionPanelSummary> | |
<Typography>Previous Posts</Typography> | |
</ExpansionPanelSummary> | |
{this.props.otherPosts.map((postObject, index) => { | |
return ( | |
<ExpansionPanelDetails key={`otherPost-${index}`}> | |
<Typography> | |
{postObject.title} | |
</Typography> | |
</ExpansionPanelDetails> | |
) | |
})} | |
</ExpansionPanel> | |
</div> | |
); | |
} | |
} | |
export default OtherPosts; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment