App.js
1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import React, { Component, Fragment } from 'react';
import './App.css';
import { withStyles, Typography, Paper, Button, TextField} from '@material-ui/core';
const styles = theme => ({
root: {
'& .MuiTextField-root': {
margin: theme.spacing(1),
width: '100%',
minWidth: 1080
},
},
title: {
marginTop: theme.spacing.unit * 5,
textAlign: 'center',
display: 'none',
fontSize: '2.0rem',
[theme.breakpoints.up('sm')]: {
display: 'block',
}
},
paper: {
marginTop: theme.spacing.unit * 5,
marginLeft: theme.spacing.unit * 20,
marginRight: theme.spacing.unit * 20
},
button: {
marginTop: theme.spacing.unit * 1,
marginLeft: theme.spacing.unit * 20,
fontSize: '1rem',
},
});
class App extends Component {
constructor(props) {
super(props);
this.state = {
script: ''
}
}
// Get Script
getScript = (e) => {
this.script = e.target.value;
}
// Send script to server && Move Next URL
handleScriptSubmit = (e) => {
console.log(this.script); // test
}
render() {
const { classes } = this.props;
return (
<Fragment>
<Typography className={classes.title} variant="h6" color="inherit" noWrap>μμ±μ λ§μΆ° λλ³Έμ νλ©΄μ μ€μκ°μΌλ‘ μΆλ ₯νλ ν둬νν° μλΉμ€</Typography>
<Paper className={classes.paper} elevation={3}>
<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>
</Fragment>
);
}
}
export default withStyles(styles)(App);