Created
March 25, 2016 04:32
-
-
Save david50407/81c041bde4596df1f86d 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
import React from 'react' | |
import { Row, Col } from 'react-flexbox-grid' | |
import AppBar from 'material-ui/lib/app-bar' | |
import IconButton from 'material-ui/lib/icon-button' | |
import NavigationArrowBack from 'material-ui/lib/svg-icons/navigation/arrow-back' | |
import LoginForm from './components/LoginForm' | |
export default React.createClass({ | |
contextTypes: { | |
router: React.PropTypes.object.isRequired, | |
}, | |
render() { | |
return ( | |
<div> | |
<AppBar title="CatCoin" iconElementLeft={ <IconButton onTouchTap={this.back}><NavigationArrowBack /></IconButton> } /> | |
<Row center="xs"> | |
<Col xs={8} sm={8} md={8} lg={6}> | |
<LoginForm onLogin={ ()=> {alert(0)}} /> | |
</Col> | |
</Row> | |
</div> | |
) | |
}, | |
back() { | |
this.context.router.push('/') | |
}, | |
login(username, password) { | |
alert(0) | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment