Last active
June 12, 2017 11:52
-
-
Save dvtng/e47a728d450d62639f117c36fb7067af to your computer and use it in GitHub Desktop.
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
class CommentTemplate extends React.Component { | |
static propTypes = { | |
// Declare slots as type node | |
metadata: PropTypes.node, | |
actions: PropTypes.node, | |
}; | |
render() { | |
return ( | |
<div> | |
<CommentHeading> | |
<Avatar user={...}/> | |
// Slot for metadata | |
<span>{this.props.metadata}</span> | |
</CommentHeading> | |
<CommentBody/> | |
<CommentFooter> | |
<Timestamp time={...}/> | |
// Slot for actions | |
<span>{this.props.actions}</span> | |
</CommentFooter> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment