refactor(home): corrigindo erros no layout e aprimorando semantica

This commit is contained in:
Bernardo Cunha Ernani Waldhelm 2023-01-14 11:39:08 -03:00
parent 4dac850a1d
commit e2ac9bc06c
9 changed files with 52 additions and 14 deletions

View File

@ -86,6 +86,7 @@
border: 1px solid $color-black1;
border-radius: 25px;
width: calc(100% - 40px);
height: 31px;
padding: 15px 20px;
display: flex;
align-items: center;
@ -99,6 +100,7 @@
color: $color-black;
@media #{$mq-desktop}, #{$mq-tablet}, #{$mq-mobile} {
height: 14px;
font-size: 14px;
line-height: 16px;
}
@ -196,7 +198,7 @@
align-items: center;
justify-content: center;
width: 100%;
height: 52px;
height: 71px;
background-color: $color-black;
border: none;
border-radius: 25px;
@ -204,12 +206,18 @@
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 19px;
font-size: 32px;
line-height: 38px;
letter-spacing: 0.05em;
text-transform: uppercase;
cursor: pointer;
@media #{$mq-desktop}, #{$mq-tablet}, #{$mq-mobile} {
height: 52px;
font-size: 16px;
line-height: 19px;
}
&:disabled{
background-color: $color-black-500;
cursor: inherit;

View File

@ -62,7 +62,7 @@
&__input {
width: 71.72%;
height: 30px;
height: 33px;
display: flex;
flex-direction: row;
align-items: flex-start;
@ -74,7 +74,7 @@
font-size: 28px;
line-height: 33px;
color: $color-black;
background: #FFFFFF;
background: $color-white;
border: 1px solid $color-primary-600;
border-radius: 4px;
@ -89,7 +89,7 @@
font-size: 14px;
line-height: 16px;
padding: 17px 16px;
height: 16px;
height: 14px;
}
&::placeholder {
@ -98,8 +98,6 @@
font-weight: 400;
font-size: 28px;
line-height: 33px;
font-size: 14px;
line-height: 16px;
color: $color-primary-400;
@media #{$mq-desktop}, #{$mq-tablet}, #{$mq-mobile} {
@ -163,7 +161,7 @@
margin-top: 8px;
font-size: 14px;
line-height: 16px;
height: 44px;
height: 50px;
}
}
}

View File

@ -29,6 +29,7 @@
justify-content: flex-start;
align-items: flex-start;
margin-right: 121px;
width: 100%;
@media #{$mq-tablet}, #{$mq-mobile} {
margin: 0;

View File

@ -111,6 +111,11 @@
}
&__cart {
background-color: transparent;
border: none;
display: contents;
cursor: pointer;
img {
width: 28px;
height: 28px;

View File

@ -15,9 +15,15 @@ const HeaderDesktop = () => {
<a href="/" className={styles["header-top__log"]}>
ENTRAR
</a>
<a href="/" className={styles["header-top__cart"]}>
<button
className={styles["header-top__cart"]}
arial-label="Abrir Carrinho"
onClick={() => {
alert("Carrinho vazio!");
}}
>
<img src={cart} alt="Img do Carrinho" />
</a>
</button>
</div>
</div>
<div className={styles["header-bottom"]}>

View File

@ -26,6 +26,17 @@
height: 22.5px;
}
}
&__icon-cart {
background-color: transparent;
border: none;
display: contents;
img {
width: 28px;
height: 28px;
}
}
}
&__input {

View File

@ -31,6 +31,7 @@ const HeaderMobile = () => {
<button
onClick={() => setMenuIsVisible(true)}
className={styles["header-mobile__top__icon-hamburger"]}
arial-label="Abrir Menu"
>
<img src={hamburger} alt="Imagem Menu Hamburger" />
</button>
@ -38,9 +39,15 @@ const HeaderMobile = () => {
<img src={logo} alt="Logo M3-ACADEMY" />
</a>
<a href="/" className={styles["header-mobile__top__icons"]}>
<button
className={styles["header-mobile__top__icon-cart"]}
arial-label="Abrir Carrinho"
onClick={() => {
alert("Carrinho vazio!");
}}
>
<img src={cart} alt="Img do Carrinho" />
</a>
</button>
</div>
<input placeholder="Buscar..." className={styles["header-mobile__input"]} />
<MenuMobile menuIsVisible={menuIsVisible} setMenuIsVisible={setMenuIsVisible} />

View File

@ -1,5 +1,6 @@
import * as Yup from 'yup';
import { cpf } from 'cpf-cnpj-validator';
import { insta } from './validations';
export default Yup.object().shape({
name: Yup.string().required("*Campo Obrigatório").min(3, "*No mínimo 3 digitos"),
@ -7,6 +8,6 @@ export default Yup.object().shape({
cpf: Yup.string().test((value:any) => cpf.isValid(value)).required("*Campo Obrigatório"),
birthDate: Yup.date().max(new Date(), "*Data inválida!").required("*Campo Obrigatório"),
celPhone: Yup.string().required('*Campo Obrigatório'),
instagram: Yup.string(),
instagram: Yup.string().matches(insta, 'Usuário Inválido!'),
acceptTerms: Yup.boolean().oneOf([true], '*'),
})

View File

@ -1,3 +1,4 @@
export const phoneNumber = /\([1-9]{2}\) 9[0-9]\d{3}-\d{4}/;
export const cpfNumber = /^[0-9]{3}.?[0-9]{3}.?[0-9]{3}-?[0-9]{2}/;
export const insta = /@(?:(?:[\w][.]{0,1})*[\w]){1,29}/;