DongyoungKwon

Add warning to inform working only in Chrome

import React, { Component, Fragment } from 'react';
import { post } from 'axios';
import { withStyles, Typography, Paper, Button, TextField } from '@material-ui/core';
import Alert from '@material-ui/lab/Alert';
const styles = theme => ({
root: {
......@@ -15,9 +16,10 @@ const styles = theme => ({
textAlign: 'center',
display: 'none',
fontSize: '2.0rem',
fontColor: 'blue',
[theme.breakpoints.up('sm')]: {
display: 'block',
}
},
},
paper: {
marginTop: theme.spacing.unit * 5,
......@@ -29,6 +31,11 @@ const styles = theme => ({
marginLeft: theme.spacing.unit * 20,
fontSize: '1rem',
},
paperAlert: {
marginTop: theme.spacing.unit * 5,
marginLeft: theme.spacing.unit * 53,
marginRight: theme.spacing.unit * 53
}
});
class MainPage extends Component {
......@@ -94,6 +101,9 @@ class MainPage extends Component {
<TextField id="outlined-textarea" label="Scriptλ₯Ό μž…λ ₯ν•΄μ£Όμ„Έμš”." fullWidth="true" rows={20} placeholder="Script" multiline variant="outlined" onChange={this.getScript} />
</Paper>
<Button className={classes.button} variant="contained" color="primary" size="medium" onClick={this.handleScriptSubmit}>μ‹œμž‘ν•©λ‹ˆλ‹€.</Button>
<Paper className={classes.paperAlert}>
<Alert severity="error">이 μ‚¬μ΄νŠΈλŠ” Google Chromeμ—μ„œ λ™μž‘ν•©λ‹ˆλ‹€. </Alert>
</Paper>
</Fragment>
);
}
......
......@@ -16,6 +16,7 @@
"author": "Dongyoung Kwon <ehddud2468@khu.ac.kr>",
"license": "MIT",
"dependencies": {
"@material-ui/lab": "^4.0.0-alpha.57",
"body-parser": "^1.19.0",
"express": "^4.17.1"
},
......
This diff is collapsed. Click to expand it.