Skip to content

Instantly share code, notes, and snippets.

@shem8
Created March 12, 2017 11:21
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/35aa8f80662f6f0f03d044cd6d9dedc4 to your computer and use it in GitHub Desktop.
Save shem8/35aa8f80662f6f0f03d044cd6d9dedc4 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: ProductShape.isRequired,
withAvatar: PropTypes.bool
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment