Created
July 16, 2017 17:20
-
-
Save Chalarangelo/f4109db9e61859b877f5797bae8982bd to your computer and use it in GitHub Desktop.
This file contains 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
function UserCard(props) { | |
var user = props.user; | |
return React.createElement( | |
'div', | |
{ className: 'col-md-offset-1 col-lg-offset-2' }, | |
React.createElement( | |
'div', | |
{ className: 'card fluid', id: "user_" + user.login.username }, | |
React.createElement( | |
'div', | |
{ className: 'section row' }, | |
React.createElement( | |
'div', | |
{ className: 'col-sm-2 col-md-1' }, | |
React.createElement('img', { src: user.picture.medium, alt: user.login.username, className: 'user-image' }) | |
), | |
React.createElement( | |
'div', | |
{ className: 'col-sm' }, | |
React.createElement( | |
'h4', | |
{ className: 'user-name' }, | |
user.name.title, | |
' ', | |
user.name.first, | |
' ', | |
user.name.last, | |
React.createElement( | |
'small', | |
null, | |
user.login.username | |
) | |
) | |
) | |
), | |
React.createElement( | |
'div', | |
{ className: 'section' }, | |
React.createElement( | |
'p', | |
{ className: 'user-email' }, | |
' ', | |
React.createElement(SvgMail, null), | |
' ', | |
user.email | |
) | |
), | |
React.createElement( | |
'div', | |
{ className: 'section' }, | |
React.createElement( | |
'p', | |
{ className: 'user-birth' }, | |
' ', | |
React.createElement(SvgCalendar, null), | |
' ', | |
user.dob.split(" ")[0].split("-").reverse().join("/") | |
) | |
), | |
React.createElement( | |
'div', | |
{ className: 'section' }, | |
React.createElement( | |
'p', | |
{ className: 'user-location' }, | |
' ', | |
React.createElement(SvgMapPin, null), | |
' ', | |
user.location.city, | |
', ', | |
user.location.state | |
) | |
) | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment