Created
March 12, 2017 11:21
-
-
Save shem8/0a1d5bc4bcbc1bcbc6eb2729dacc95f2 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