Skip to content

Commit dbd751a

Browse files
Bruno BachBruno Bach
authored andcommitted
Adicionando a pagina de registro
1 parent 0b971ea commit dbd751a

File tree

9 files changed

+440
-30
lines changed

9 files changed

+440
-30
lines changed
Lines changed: 52 additions & 0 deletions
Loading
Lines changed: 51 additions & 0 deletions
Loading

web/src/assets/images/logo.svg

Lines changed: 6 additions & 6 deletions
Loading

web/src/pages/Login/index.tsx

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1-
import React, { useState } from "react";
1+
import React, { useState, useEffect } from "react";
22
import { Link } from "react-router-dom";
33

44
import Input from "../../components/Input";
5+
import purpleHeartIcon from '../../assets/images/icons/purple-heart.svg';
6+
7+
import logoImg from "../../assets/images/logo.svg";
58

69
import "./styles.css";
710

811
function Login() {
912
const [email, setEmail] = useState("");
1013
const [password, setPassword] = useState("");
14+
const [remember, setRemember] = useState("");
15+
16+
useEffect(() => {
17+
console.log(remember);
18+
}, [remember]);
19+
1120
return (
1221
<div id="page-login">
1322
<div className="page-login-logo" />
1423

1524
<div className="page-login-form">
25+
<div className="top-bar-login">
26+
<img src={logoImg} alt="Proffy" />
27+
</div>
1628
<form>
1729
<h2>Fazer login</h2>
1830
<Input
@@ -22,16 +34,24 @@ function Login() {
2234
value={email}
2335
onChange={(e) => setEmail(e.target.value)}
2436
/>
37+
2538
<Input
2639
typeinput="password"
2740
name="password"
2841
label="Senha"
2942
value={password}
3043
onChange={(e) => setPassword(e.target.value)}
44+
className="password-input"
3145
/>
46+
3247
<div className="remember-password">
33-
<input type="checkbox" id="remember-check" name="remember-check" />
34-
<label htmlFor="remember-check">Lembrar senha</label>
48+
<input
49+
type="checkbox"
50+
id="remember-check"
51+
name="remember-check"
52+
onChange={(e) => setRemember(e.target.value)}
53+
/>
54+
<label htmlFor="remember-check">Lembrar-me</label>
3555
<a href="">Esqueci minha senha</a>
3656
</div>
3757
<button
@@ -41,6 +61,16 @@ function Login() {
4161
>
4262
Entrar
4363
</button>
64+
65+
<div className="form-footer">
66+
<h2>Nao tem conta?</h2>
67+
<span>É de graça</span>
68+
<img src={purpleHeartIcon} alt="Coração Roxo" />
69+
</div>
70+
<Link to="/register">
71+
Cadastre-se Agora
72+
</Link>
73+
4474
</form>
4575
</div>
4676
</div>

web/src/pages/Login/styles.css

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@
1414
width: 100vw;
1515
height: 100vh;
1616
}
17+
.top-bar-login {
18+
display: flex;
19+
justify-content: flex-end;
20+
width: 100%;
21+
}
22+
23+
.top-bar-login img {
24+
margin: 10px 20px 0 0;
25+
width: 150px;
26+
height: 50px;
27+
}
1728
.page-login-form form h2 {
1829
font: 700 2.5rem Archivo;
1930
color: var(--color-text-base);
@@ -28,39 +39,37 @@
2839
.page-login-form form {
2940
display: flex;
3041
flex-direction: column;
31-
margin-top: 30%;
42+
margin-top: 20%;
3243
margin-left: 25%;
3344
width: 50%;
3445
justify-self: center;
3546
align-self: center;
3647
}
3748

3849
.remember-password {
39-
display: flex;
40-
justify-content: space-between;
41-
margin-top: 10px;
50+
display: flex;
51+
justify-content: space-between;
52+
margin-top: 10px;
4253
}
4354
.remember-password label {
44-
margin-right: 40px;
45-
margin-left: -50px;
46-
font: 400 1.8rem Archivo;
47-
color: var(--color-text-base);
55+
margin-right: 40px;
56+
margin-left: -50px;
57+
font: 400 1.8rem Archivo;
58+
color: var(--color-text-base);
4859
}
4960

5061
.remember-password a {
51-
font: 400 1.8rem Archivo;
52-
outline: 0;
53-
color: var(--color-text-base);
54-
text-decoration: none;
62+
font: 400 1.8rem Archivo;
63+
outline: 0;
64+
color: var(--color-text-base);
65+
text-decoration: none;
5566
}
5667

5768
#remember-check {
58-
width: 40px;
59-
height: 20px;
69+
width: 40px;
70+
height: 20px;
6071
}
6172

62-
63-
6473
.page-login-form form button {
6574
height: 5.6rem;
6675
border: 0;
@@ -84,3 +93,19 @@
8493
color: var(--color-button-text);
8594
cursor: pointer;
8695
}
96+
97+
.form-footer {
98+
display: flex;
99+
margin-top: 40%;
100+
}
101+
.form-footer h2 {
102+
font: 700 1rem Archivo;
103+
color: var(--color-text-base);
104+
margin-bottom: 10px;
105+
}
106+
107+
.form-footer span {
108+
font: 400 1.5rem Archivo;
109+
color: var(--color-text-complement);
110+
margin: 10px 5px 0 30%;
111+
}

web/src/pages/Register/index.tsx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import React, { useState, useEffect } from "react";
2+
import { Link } from "react-router-dom";
3+
4+
import Input from "../../components/Input";
5+
6+
import logoImg from "../../assets/images/logo.svg";
7+
import backIcon from "../../assets/images/icons/back.svg";
8+
9+
import "./styles.css";
10+
11+
function Register() {
12+
const [name, setName] = useState("");
13+
const [lastname, setLastname] = useState("");
14+
const [email, setEmail] = useState("");
15+
const [password, setPassword] = useState("");
16+
return (
17+
<div id="page-register">
18+
<div className="page-register-logo" />
19+
<div className="page-register-form">
20+
<div className="top-bar-register">
21+
<Link to="/home">
22+
<img src={backIcon} alt="Voltar" />
23+
</Link>
24+
25+
<img src={logoImg} alt="Proffy" />
26+
</div>
27+
28+
<form>
29+
<h2>Cadastro</h2>
30+
<legend>Preencha os dados abaixo para começar.</legend>
31+
32+
<Input
33+
typeinput="text"
34+
name="name"
35+
label="Nome"
36+
value={name}
37+
onChange={(e) => setName(e.target.value)}
38+
/>
39+
<Input
40+
typeinput="text"
41+
name="lastname"
42+
label="Sobrenome"
43+
value={lastname}
44+
onChange={(e) => setLastname(e.target.value)}
45+
/>
46+
<Input
47+
typeinput="text"
48+
name="email"
49+
label="E-mail"
50+
value={email}
51+
onChange={(e) => setEmail(e.target.value)}
52+
/>
53+
<Input
54+
typeinput="password"
55+
name="password"
56+
label="Senha"
57+
value={password}
58+
onChange={(e) => setPassword(e.target.value)}
59+
/>
60+
<button
61+
className={password && email ? "active" : "disabled"}
62+
disabled={email.length <= 1 && password.length <= 1}
63+
type="submit"
64+
>
65+
Concluir cadastro
66+
</button>
67+
</form>
68+
</div>
69+
</div>
70+
);
71+
}
72+
73+
export default Register;

0 commit comments

Comments
 (0)