From dc6b02c8172dc11995c0406564819a07e900aa02 Mon Sep 17 00:00:00 2001 From: Thiago Bronisio <86695254+ThiagoBronisio@users.noreply.github.com> Date: Thu, 5 Jan 2023 23:23:44 -0300 Subject: [PATCH] feat: adiciona o html estatico do header mobile --- src/assets/img/close.svg | 4 ++ src/assets/img/hamburguer.svg | 5 ++ src/components/Header/Header.module.scss | 56 ++++++++++++++----- src/components/Header/Header.tsx | 25 ++++++--- .../InputMenuMobile/InputMenuMobile.tsx | 27 +++++++++ .../inputMenuMobile.module.scss | 47 ++++++++++++++++ .../MenuHamburguer/MenuHamburguer.module.scss | 18 ++++++ .../Header/MenuHamburguer/MenuHamburguer.tsx | 50 +++++++++++++++++ src/global.scss | 1 + 9 files changed, 211 insertions(+), 22 deletions(-) create mode 100644 src/assets/img/close.svg create mode 100644 src/assets/img/hamburguer.svg create mode 100644 src/components/Header/InputMenuMobile/InputMenuMobile.tsx create mode 100644 src/components/Header/InputMenuMobile/inputMenuMobile.module.scss create mode 100644 src/components/Header/MenuHamburguer/MenuHamburguer.module.scss create mode 100644 src/components/Header/MenuHamburguer/MenuHamburguer.tsx diff --git a/src/assets/img/close.svg b/src/assets/img/close.svg new file mode 100644 index 0000000..e0e6d36 --- /dev/null +++ b/src/assets/img/close.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/img/hamburguer.svg b/src/assets/img/hamburguer.svg new file mode 100644 index 0000000..6cadeb3 --- /dev/null +++ b/src/assets/img/hamburguer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/Header/Header.module.scss b/src/components/Header/Header.module.scss index e3f2622..6dbe7a1 100644 --- a/src/components/Header/Header.module.scss +++ b/src/components/Header/Header.module.scss @@ -1,5 +1,5 @@ -.container-header { - .header-wrapper { +.container { + &__wrapper { display: flex; align-items: center; justify-content: space-between; @@ -7,12 +7,17 @@ background-color: var(--black); border-bottom: 1px solid var(--gray-100); + @media (max-width: 1024px) { + border: none; + padding: 25px 16px; + } + &__container-logo { - width: 12.597%; + width: 136px; height: 25.86px; - @media screen and (min-width: 2500px) { - width: 11.55%; + @media (min-width: 2500px) { + width: 265.62px; height: 50.5px; } @@ -22,7 +27,7 @@ .logo-m3 { width: 100%; - @media screen and (min-width: 2500px) { + @media (min-width: 2500px) { height: 50.5px; } } @@ -32,8 +37,11 @@ &__container-input-busca { position: relative; width: 24.452%; + @media (max-width: 1024px) { + display: none; + } - @media screen and (min-width: 2500px) { + @media (min-width: 2500px) { width: 22.421%; } @@ -52,7 +60,7 @@ //font-family: roboto; - @media screen and (min-width: 2500px) { + @media (min-width: 2500px) { height: 57px; font-weight: 400; @@ -75,7 +83,11 @@ right: 17px; cursor: pointer; - @media screen and (min-width: 2500px) { + @media (max-width: 1025px) { + display: none; + } + + @media (min-width: 2500px) { width: 35.15px; height: 35.15px; top: 10px; @@ -85,7 +97,8 @@ img { height: 18px; width: 18px; - @media screen and (min-width: 2500px) { + color: var(--black-200); + @media (min-width: 2500px) { width: 35.15px; height: 35.15px; } @@ -107,21 +120,31 @@ font-family: var(--font-roboto); cursor: pointer; - @media screen and (min-width: 2500px) { + @media (max-width: 1024px) { + display: none; + } + + @media (min-width: 2500px) { font-weight: 400; font-size: 28px; line-height: 33px; } } - img { + button { + background: transparent; + border: none; width: 28px; height: 28px; - @media screen and (min-width: 2500px) { + @media (min-width: 2500px) { width: 54.68px; height: 54.68px; } + + img { + width: 100%; + } } } } @@ -129,6 +152,9 @@ .container-nav { background-color: var(--black); padding: 14px 100.32px 14px 100px; + @media (max-width: 1025px) { + display: none; + } ul { display: flex; @@ -141,7 +167,7 @@ color: var(--white); font-family: var(--font-roboto); - @media screen and (min-width: 2500px) { + @media (min-width: 2500px) { font-weight: 500; font-size: 28px; line-height: 33px; @@ -156,7 +182,7 @@ li:nth-child(2) { margin: 0 55px; - @media screen and (min-width: 2500px) { + @media (min-width: 2500px) { margin: 0 55.92px 0 55.71px; } } diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 07b9587..0c8b70a 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -1,4 +1,7 @@ import React from "react"; +import { InputMenuMobile } from "./InputMenuMobile/InputMenuMobile" +import { MenuHamburguer } from "./MenuHamburguer/MenuHamburguer" + import styleHeader from "./Header.module.scss" import logo from "../../assets/img/logo-m3.png" @@ -8,17 +11,21 @@ import search from "../../assets/img/search.svg" export function Header() { - return ( -
-
-
+ return ( +
+ +
+ + + + -
+
@@ -28,13 +35,17 @@ export function Header() {
-
+

ENTRAR

- Carrinho +
+ +