Last active
March 17, 2017 15:23
-
-
Save shem8/7d3bc01824b2f42245786edf5d0a023d 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: UserShape.isRequired, | |
withAvatar: PropTypes.bool | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment