Last active
November 15, 2017 15:41
-
-
Save ridoansaleh/70174786502d10a43620e50dbd823106 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>Belajar React</title> | |
<link rel="stylesheet" type="text/css" href="styles.css"> | |
<script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/[email protected]/babel.min.js"></script> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script type="text/babel"> | |
function Form() { | |
return( | |
<div> | |
<h2>Login Form</h2> | |
<form> | |
<div className="imgcontainer"> | |
<img src="avatar.png" alt="Avatar" className="avatar"/> | |
</div> | |
<div className="container"> | |
<label><b>Username</b></label> | |
<input type="text" placeholder="Enter Username" name="uname" required/> | |
<label><b>Password</b></label> | |
<input type="password" placeholder="Enter Password" name="psw" required/> | |
<button type="submit">Login</button> | |
<input type="checkbox" defaultChecked/> Remember me | |
</div> | |
<div className="container" style={{backgroundColor: '#f1f1f1'}}> | |
<button type="button" className="cancelbtn">Cancel</button> | |
<span className="psw">Forgot <a href="#">password?</a></span> | |
</div> | |
</form> | |
</div> | |
); | |
} | |
ReactDOM.render( | |
<Form/>, | |
document.getElementById('root') | |
); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment