Created
March 12, 2017 11:21
-
-
Save shem8/35aa8f80662f6f0f03d044cd6d9dedc4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const UserCard = ({ user, withAvatar }) => { | |
return ( | |
<div> | |
{ withAvatar && <img src={user.avatarUrl}/> } | |
<span> | |
{user.name} | |
</span> | |
<span> | |
{user.info} | |
</span> | |
</div> | |
); | |
}; | |
UserCard.propTypes = { | |
user: ProductShape.isRequired, | |
withAvatar: PropTypes.bool | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment