2017-05-25 16:36:21 +00:00
|
|
|
import React, {Component} from 'react'
|
|
|
|
import Button from 'material-ui/Button'
|
|
|
|
import Dialog, {
|
|
|
|
DialogTitle,
|
|
|
|
DialogContent,
|
|
|
|
DialogContentText,
|
|
|
|
DialogActions
|
|
|
|
} from 'material-ui/Dialog'
|
|
|
|
import Typography from 'material-ui/Typography'
|
|
|
|
import App from '../components/App'
|
|
|
|
|
|
|
|
const styles = {
|
|
|
|
container: {
|
|
|
|
textAlign: 'center',
|
|
|
|
paddingTop: 200
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Index extends Component {
|
2017-06-23 13:51:25 +00:00
|
|
|
state = {
|
|
|
|
open: false
|
|
|
|
};
|
2017-05-25 16:36:21 +00:00
|
|
|
|
|
|
|
handleRequestClose = () => {
|
|
|
|
this.setState({
|
|
|
|
open: false
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
|
|
|
handleClick = () => {
|
|
|
|
this.setState({
|
|
|
|
open: true
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<App>
|
|
|
|
<div style={styles.container}>
|
|
|
|
<Dialog open={this.state.open} onRequestClose={this.handleRequestClose}>
|
|
|
|
<DialogTitle>Super Secret Password</DialogTitle>
|
|
|
|
<DialogContent>
|
|
|
|
<DialogContentText>1-2-3-4-5</DialogContentText>
|
|
|
|
</DialogContent>
|
|
|
|
<DialogActions>
|
2017-06-23 13:51:25 +00:00
|
|
|
<Button color='primary' onClick={this.handleRequestClose}>OK</Button>
|
2017-05-25 16:36:21 +00:00
|
|
|
</DialogActions>
|
|
|
|
</Dialog>
|
|
|
|
<Typography type='display1' gutterBottom>Material-UI</Typography>
|
|
|
|
<Typography type='subheading' gutterBottom>example project</Typography>
|
2017-06-23 13:51:25 +00:00
|
|
|
<Button raised color='accent' onClick={this.handleClick}>
|
2017-05-25 16:36:21 +00:00
|
|
|
Super Secret Password
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</App>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Index
|