1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-material-ui-next/pages/index.js

61 lines
1.4 KiB
JavaScript
Raw Normal View History

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
};
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>
</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}>
Super Secret Password
</Button>
</div>
</App>
)
}
}
export default Index