-
-
Save ShanaLMoore/723b7b9bf3fe2bfc470f17db88a7d7c5 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Intro to React</title> | |
<meta charset="utf-8"> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.2.0/react.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.2.0/react-dom.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.5.2/redux.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/4.4.5/react-redux.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script> | |
<style> | |
.user-profile { | |
width: 200px; | |
padding: 3px; | |
border: solid black thin; | |
} | |
.user-profile img { | |
width: 48px; | |
height: 48px; | |
border-radius: 24px; | |
border: thin black solid; | |
} | |
.user-profile .details { | |
display: inline-block; | |
vertical-align: top; | |
margin-left: 10px; | |
margin-top: 5px; | |
} | |
.user-profile .color { | |
margin-top: 3px; | |
border-bottom: 2px solid blue; | |
} | |
.user-profile .first-name:after { | |
content: " " | |
} | |
</style> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script type="text/babel"> | |
var UserProfile = function() { | |
return ( | |
<div className='user-profile'> | |
<img src="https://randomuser.me/api/portraits/med/lego/1.jpg" /> | |
<div className='details'> | |
<div className='name'> | |
<span className="first-name">Adam</span> | |
<span className="last-name">Ingram-Goble</span> | |
</div> | |
<div className='color'>Color: blue</div> | |
</div> | |
</div> | |
); | |
}; | |
ReactDOM.render( | |
<UserProfile />, | |
document.getElementById('app') | |
); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment