Skip to content

Instantly share code, notes, and snippets.

@david50407
Created March 25, 2016 04:32
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 david50407/81c041bde4596df1f86d to your computer and use it in GitHub Desktop.
Save david50407/81c041bde4596df1f86d to your computer and use it in GitHub Desktop.
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