Added modal registr
This commit is contained in:
@ -14,6 +14,7 @@ import ModalErrorLogin from "../../components/UI/ModalErrorLogin/ModalErrorLogin
|
||||
import { apiRequest } from "../../api/request";
|
||||
|
||||
import ellipse from "../../images/ellipse.png";
|
||||
import ModalRegistration from "../UI/ModalRegistration/ModalRegistration";
|
||||
|
||||
import "./authBox.scss";
|
||||
|
||||
@ -27,6 +28,7 @@ export const AuthBox = ({ title }) => {
|
||||
|
||||
const [error, setError] = useState(null);
|
||||
const [modalError, setModalError] = useState(false);
|
||||
const [modalReg, setModalReg] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!localStorage.getItem("auth_token")) {
|
||||
@ -112,11 +114,12 @@ export const AuthBox = ({ title }) => {
|
||||
{isLoading ? <Loader /> : "Войти"}
|
||||
</button>
|
||||
|
||||
{/* TODO: при клике отправлять на форму/модалку/страницу регистрации */}
|
||||
<ModalRegistration active={modalReg} setActive={setModalReg} />
|
||||
<button
|
||||
className="auth-box__form-btn--role auth-box__auth-link"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
setModalReg(true);
|
||||
}}
|
||||
>
|
||||
Регистрация
|
||||
|
79
src/components/UI/ModalRegistration/ModalRegistration.js
Normal file
79
src/components/UI/ModalRegistration/ModalRegistration.js
Normal file
@ -0,0 +1,79 @@
|
||||
import React from "react";
|
||||
|
||||
import tgLogo from "../../../images/TgLogo.svg";
|
||||
import doc from "../../../images/doc.svg";
|
||||
import anyMoment from "../../../images/anyMoment.svg";
|
||||
|
||||
import "./modalRegistration.scss";
|
||||
|
||||
export const ModalRegistration = ({ active, setActive }) => {
|
||||
return (
|
||||
<div
|
||||
className={active ? "modal-registration active" : "modal-registration"}
|
||||
onClick={() => setActive(false)}
|
||||
>
|
||||
<div
|
||||
className="modal-registration__content"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<div className="body-reg__left">
|
||||
<h2>
|
||||
Подключайтесь к <p>itguild.</p>
|
||||
</h2>
|
||||
<p className="body-reg__left-desc">
|
||||
Зарегистрируйтесь и назначайте собеседования любым специалистам без
|
||||
задержек
|
||||
</p>
|
||||
|
||||
<div className="input-body">
|
||||
<div className="input-body__box">
|
||||
<h5>Ваше имя</h5>
|
||||
<input></input>
|
||||
<h5>E-mail</h5>
|
||||
<input></input>
|
||||
</div>
|
||||
|
||||
<div className="input-body__box">
|
||||
<h5>Название компании</h5>
|
||||
<input></input>
|
||||
<h5>Пароль</h5>
|
||||
<input></input>
|
||||
</div>
|
||||
</div>
|
||||
<div className="button-box">
|
||||
<button>Отправить</button>
|
||||
<h5>
|
||||
У вас уже есть аккаунт? <p>Войти</p>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div className="body-reg__right">
|
||||
<h4>Отказ от специалиста в любой момент</h4>
|
||||
<div className="body-reg__right-text">
|
||||
<img src={anyMoment}></img>
|
||||
<p>
|
||||
Поменяйте, откажитесь или возьмите еще специалиста в любой момент
|
||||
работы.
|
||||
</p>
|
||||
</div>
|
||||
<h4>100% постоплата</h4>
|
||||
<div className="body-reg__right-text">
|
||||
<img src={doc}></img>
|
||||
<p>
|
||||
Договор не подразумевает какую‑либо оплату до того, как вы
|
||||
арендовали специалиста
|
||||
</p>
|
||||
</div>
|
||||
<h4>Есть вопросы?</h4>
|
||||
<div className="body-reg__right-text">
|
||||
<img src={tgLogo}></img>
|
||||
<p>Напишите нам в Телеграм. Мы с удовольствием ответим!</p>
|
||||
</div>
|
||||
</div>
|
||||
<span onClick={() => setActive(false)}></span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ModalRegistration;
|
174
src/components/UI/ModalRegistration/modalRegistration.scss
Normal file
174
src/components/UI/ModalRegistration/modalRegistration.scss
Normal file
@ -0,0 +1,174 @@
|
||||
.modal-registration {
|
||||
z-index: 9;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.11);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transform: scale(0);
|
||||
|
||||
&__content {
|
||||
position: relative;
|
||||
background: white;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
justify-content: space-between;
|
||||
border: 1px solid #dde2e4;
|
||||
border-radius: 8px;
|
||||
width: 1088px;
|
||||
height: 529px;
|
||||
|
||||
.body-reg {
|
||||
&__left {
|
||||
padding: 60px 0 30px 77px;
|
||||
|
||||
h2 {
|
||||
font-weight: 500;
|
||||
font-size: 35px;
|
||||
line-height: 32px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 405px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h2 > p {
|
||||
font-size: 35px;
|
||||
color: #52b709;
|
||||
}
|
||||
|
||||
&-desc {
|
||||
text-align: center;
|
||||
width: 500px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
line-height: 28px;
|
||||
margin: 20px auto 0 auto;
|
||||
}
|
||||
|
||||
.input-body {
|
||||
margin-top: 44px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
&__box {
|
||||
margin-right: 25px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
h5 {
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 294px;
|
||||
height: 35px;
|
||||
background: #eff2f7;
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
margin-bottom: 35px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 10px;
|
||||
|
||||
button {
|
||||
width: 174px;
|
||||
height: 46px;
|
||||
background: #52b709;
|
||||
border-radius: 44px;
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
line-height: 32px;
|
||||
color: white;
|
||||
margin-right: 55px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
font-size: 16px;
|
||||
line-height: 28px;
|
||||
|
||||
p {
|
||||
color: #406128;
|
||||
text-decoration: underline;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__right {
|
||||
border-left: 1px solid #f1f1f1;
|
||||
padding: 80px 32px 46px 25px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
h4 {
|
||||
font-weight: 900;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
color: #52b709;
|
||||
margin-right: 100px;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
&-text {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
p {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
width: 205px;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 18px 20px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
span {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 36px;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 2px;
|
||||
background: #263238;
|
||||
}
|
||||
|
||||
&:before {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
&:after {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-registration.active {
|
||||
transform: scale(1);
|
||||
}
|
Reference in New Issue
Block a user