Created
November 30, 2017 22:55
-
-
Save wschenk/252856a5e6bc0a0718dca8da98631a08 to your computer and use it in GitHub Desktop.
material-ui example login form
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
import React, {Component} from 'react'; | |
import Button from 'material-ui/Button'; | |
import TextField from 'material-ui/TextField'; | |
import Dialog, { | |
DialogActions, | |
DialogContent, | |
DialogContentText, | |
DialogTitle, | |
withMobileDialog | |
} from 'material-ui/Dialog'; | |
class Login extends Component { | |
render() { | |
return ( | |
<Dialog | |
open | |
onRequestClose={this.props.toggleLogin} | |
fullScreen={this.props.fullScreen}> | |
<DialogTitle>Subscribe</DialogTitle> | |
<DialogContent> | |
<DialogContentText> | |
To subscribe to this website, please enter your email address here. We will send | |
updates occationally. | |
</DialogContentText> | |
<TextField | |
autoFocus | |
margin="dense" | |
id="name" | |
label="Email Address" | |
type="email" | |
fullWidth | |
/> | |
</DialogContent> | |
<DialogActions> | |
<Button onClick={this.props.toggleLogin} color="primary"> | |
Cancel | |
</Button> | |
<Button onClick={this.props.toggleLogin} color="primary"> | |
Subscribe | |
</Button> | |
</DialogActions> | |
</Dialog> | |
); | |
} | |
} | |
export default withMobileDialog()(Login); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment