Skip to content

Instantly share code, notes, and snippets.

@shem8
Last active March 17, 2017 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shem8/7d3bc01824b2f42245786edf5d0a023d to your computer and use it in GitHub Desktop.
Save shem8/7d3bc01824b2f42245786edf5d0a023d to your computer and use it in GitHub Desktop.
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