forked from M3-Academy/desafio-react-e-typescript
Merge branch 'feature/header' into development
This commit is contained in:
commit
46b93e2e65
@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import "./App.css";
|
||||
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
||||
import Header from "./components/Header";
|
||||
import Footer from "./components/Footer";
|
||||
import Home from "./pages/Home";
|
||||
import Institutional from "./pages/Institutional";
|
||||
@ -19,6 +20,7 @@ const router = createBrowserRouter([
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Header />
|
||||
<RouterProvider router={router} />
|
||||
<Footer />
|
||||
</div>
|
||||
|
12
src/assets/cart.svg
Normal file
12
src/assets/cart.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5537_970)">
|
||||
<path d="M27.823 4.07236C27.6697 3.88079 27.4377 3.76928 27.1923 3.76928H5.69581L5.09469 1.16451C5.01009 0.798054 4.68377 0.538452 4.30768 0.538452H0.80768C0.361648 0.538452 0 0.9001 0 1.34619C0 1.79227 0.361648 2.15387 0.80768 2.15387H3.66516L7.7455 19.8355C7.83005 20.2019 8.15642 20.4615 8.53251 20.4615H24.7154C25.1614 20.4615 25.523 20.0999 25.523 19.6539C25.523 19.2078 25.1614 18.8462 24.7154 18.8462H9.17509L8.55384 16.1539H24.7693C25.1471 16.1539 25.4744 15.892 25.5573 15.5235L27.9803 4.75426C28.0342 4.51483 27.9763 4.26398 27.823 4.07236Z" fill="white"/>
|
||||
<path d="M11.8462 21.5385C10.2132 21.5385 8.88464 22.867 8.88464 24.5C8.88464 26.133 10.2132 27.4615 11.8462 27.4615C13.4792 27.4615 14.8077 26.133 14.8077 24.5C14.8077 22.867 13.4792 21.5385 11.8462 21.5385Z" fill="white"/>
|
||||
<path d="M21.5385 21.5385C19.9055 21.5385 18.5769 22.867 18.5769 24.5C18.5769 26.133 19.9054 27.4615 21.5385 27.4615C23.1714 27.4615 24.5 26.133 24.5 24.5C24.5 22.867 23.1715 21.5385 21.5385 21.5385Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5537_970">
|
||||
<rect width="28" height="28" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/logoM3.png
Normal file
BIN
src/assets/logoM3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
3
src/assets/lupa.svg
Normal file
3
src/assets/lupa.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.2094 11.6186C14.0951 10.409 14.6249 8.92328 14.6249 7.31261C14.6249 3.28064 11.3444 0.00012207 7.31245 0.00012207C3.28048 0.00012207 0 3.28064 0 7.31261C0 11.3446 3.28052 14.6251 7.31248 14.6251C8.92315 14.6251 10.409 14.0952 11.6186 13.2094L16.4092 18L18 16.4092C18 16.4092 13.2094 11.6186 13.2094 11.6186ZM7.31248 12.3751C4.52086 12.3751 2.25001 10.1042 2.25001 7.31261C2.25001 4.52098 4.52086 2.25013 7.31248 2.25013C10.1041 2.25013 12.375 4.52098 12.375 7.31261C12.375 10.1042 10.1041 12.3751 7.31248 12.3751Z" fill="#303030"/>
|
||||
</svg>
|
After Width: | Height: | Size: 648 B |
31
src/components/Header/index.tsx
Normal file
31
src/components/Header/index.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
import styles from "./styles.module.scss";
|
||||
import Logo from "../../assets/logoM3.png";
|
||||
import Lupa from "../../assets/lupa.svg";
|
||||
import Cart from "../../assets/cart.svg";
|
||||
|
||||
export default function Header() {
|
||||
return (
|
||||
<>
|
||||
<header className={styles.Header}>
|
||||
<div className={styles.firstDiv}>
|
||||
<img className={styles.logo} src={Logo} alt="logo m3" />
|
||||
<div className={styles.searchDiv}>
|
||||
<input type="text" placeholder="Buscar..."></input>
|
||||
<img src={Lupa} alt="lupa" />
|
||||
</div>
|
||||
<div className={styles.headerButton}>
|
||||
<button className={styles.buttonEntrar}>Entrar</button>
|
||||
<button className={styles.cartButton}>
|
||||
<img src={Cart} alt="carrinho de compra" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div className={styles.secondDiv}>
|
||||
<button className={styles.secondHeaderButton}>cursos</button>
|
||||
<button className={styles.secondHeaderButton}>saiba mais</button>
|
||||
<button className={styles.secondHeaderButton}>institucionais</button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
95
src/components/Header/styles.module.scss
Normal file
95
src/components/Header/styles.module.scss
Normal file
@ -0,0 +1,95 @@
|
||||
.Header {
|
||||
background: black;
|
||||
padding: 22px 0;
|
||||
color: white;
|
||||
|
||||
.firstDiv {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.searchDiv {
|
||||
width: 20.63vw;
|
||||
background: white;
|
||||
border-radius: 5px;
|
||||
border: 2px solid #f2f2f2;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 3.79%;
|
||||
|
||||
input {
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
height: 32px;
|
||||
border: 0;
|
||||
width: 77.27%;
|
||||
}
|
||||
|
||||
img {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
// width: 1.41vw;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.headerButton {
|
||||
display: flex;
|
||||
gap: 55px;
|
||||
padding-right: 7.81vw;
|
||||
height: 28px;
|
||||
|
||||
.buttonEntrar {
|
||||
cursor: pointer;
|
||||
justify-content: center;
|
||||
text-transform: uppercase;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
background: black;
|
||||
height: 28px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.cartButton {
|
||||
cursor: pointer;
|
||||
background: black;
|
||||
height: 28px;
|
||||
border: 0;
|
||||
|
||||
img {
|
||||
display: flex;
|
||||
height: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
padding-left: 7.81vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.secondDiv {
|
||||
background: black;
|
||||
margin-top: 1px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 14px 0 14px 7.81vw;
|
||||
gap: 55px;
|
||||
|
||||
.secondHeaderButton {
|
||||
background: black;
|
||||
color: white;
|
||||
border: 0;
|
||||
text-transform: uppercase;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user