LoginPage.js
2.38 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import React, { useState } from "react";
import { makeStyles } from "@material-ui/core/styles";
import { Link } from "react-router-dom";
import Grid from "@material-ui/core/Grid";
import Paper from "@material-ui/core/Paper";
import TextField from "@material-ui/core/TextField";
import Button from "@material-ui/core/Button";
const useStyles = makeStyles((theme) => ({
root: {
position: "fixed",
minHeight: "100vh",
minWidth: "100vw",
backgroundColor: "rgba(0,0,0,0.8)",
},
paper: {
width: "25rem",
height: "28rem",
marginTop: "8rem",
marginLeft: "auto",
marginRight: "auto",
backgroundColor: "rgba(255,255,255,0.8)",
},
grid: {
"& > *": {
position: "relative",
marginLeft: "auto",
marginRight: "auto",
},
},
title: {
width: "100%",
marginTop: "5rem",
fontSize: 40,
textAlign: "center",
},
idInput: {
top: "3.5rem",
width: "70%",
},
pwInput: {
top: "5.5rem",
width: "70%",
},
signin: {
top: "7.4rem",
width: "70%",
},
signup: {
fontSize: 13,
top: "7.9rem",
},
}));
export default function LandingPage() {
const classes = useStyles();
const [userID, setUserID] = useState();
const [userPW, setUserPW] = useState();
return (
<div className={classes.root}>
<Paper className={classes.paper} elevation={3}>
<Grid container className={classes.grid}>
<div className={classes.title}>LOGIN</div>
<TextField
className={classes.idInput}
label="ID"
variant="outlined"
size="small"
onChange={(e) => {
setUserID(e.target.value);
}}
/>
<TextField
className={classes.pwInput}
label="Password"
type="password"
autoComplete="current-password"
variant="outlined"
size="small"
onChange={(e) => {
setUserPW(e.target.value);
}}
/>
<Button className={classes.signin} variant="outlined" size="small">
Login
</Button>
<div className={classes.signup}>
<Link
to="/signup"
style={{ color: "gray", textDecoration: "none" }}
>
Click here to SIGN UP
</Link>
</div>
</Grid>
</Paper>
</div>
);
}