forked from M3-Academy/desafio-react-e-typescript
made: header
This commit is contained in:
parent
b26b517bdf
commit
38e50b1c14
@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import "./App.css";
|
||||
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
||||
import Header from "./components/Header";
|
||||
import Home from "./components/Home";
|
||||
import Institutional from "./components/Institutional";
|
||||
import Footer from "./components/Footer";
|
||||
@ -19,6 +20,7 @@ const router = createBrowserRouter([
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Header />
|
||||
<RouterProvider router={router} />
|
||||
<Footer />
|
||||
</div>
|
||||
|
9
src/assets/svg/M3logo.svg
Normal file
9
src/assets/svg/M3logo.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 19 KiB |
12
src/assets/svg/cart.svg
Normal file
12
src/assets/svg/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_3715_4730)">
|
||||
<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.8461 21.5385C10.2132 21.5385 8.88458 22.867 8.88458 24.5C8.88458 26.133 10.2131 27.4615 11.8461 27.4615C13.4791 27.4615 14.8077 26.133 14.8077 24.5C14.8077 22.867 13.4792 21.5385 11.8461 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_3715_4730">
|
||||
<rect width="28" height="28" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
10
src/assets/svg/lupa.svg
Normal file
10
src/assets/svg/lupa.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_6775_39)">
|
||||
<path d="M13.2094 11.6187C14.0951 10.4091 14.6249 8.92334 14.6249 7.31267C14.6249 3.2807 11.3444 0.000183105 7.31245 0.000183105C3.28048 0.000183105 0 3.2807 0 7.31267C0 11.3446 3.28052 14.6252 7.31248 14.6252C8.92315 14.6252 10.409 14.0953 11.6186 13.2095L16.4092 18.0001L18 16.4093C18 16.4092 13.2094 11.6187 13.2094 11.6187V11.6187ZM7.31248 12.3751C4.52086 12.3751 2.25001 10.1043 2.25001 7.31267C2.25001 4.52104 4.52086 2.25019 7.31248 2.25019C10.1041 2.25019 12.375 4.52104 12.375 7.31267C12.375 10.1043 10.1041 12.3751 7.31248 12.3751Z" fill="#303030"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_6775_39">
|
||||
<rect width="18" height="18" rx="5" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 812 B |
@ -224,7 +224,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1279px) {
|
||||
@media screen and (max-width: 1024px) {
|
||||
.footer_bottom {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
|
35
src/components/Header/index.tsx
Normal file
35
src/components/Header/index.tsx
Normal file
@ -0,0 +1,35 @@
|
||||
import styles from "./styles.module.scss";
|
||||
import M3Logo from "../../assets/svg/M3logo.svg";
|
||||
import Lupa from "../../assets/svg/lupa.svg";
|
||||
import Cart from "../../assets/svg/cart.svg";
|
||||
|
||||
export default function Header() {
|
||||
return (
|
||||
<>
|
||||
<header>
|
||||
<div className={styles.header_top}>
|
||||
<div className={styles.first_div}>
|
||||
<img className={styles.m3_logo} src={M3Logo} alt="logo m3" />
|
||||
<div className={styles.search}>
|
||||
<input type="text" placeholder="Buscar..."></input>
|
||||
<img src={Lupa} alt="lupa" />
|
||||
</div>
|
||||
<div className={styles.header_button}>
|
||||
<button className={styles.button_entrar}>Entrar</button>
|
||||
<button className={styles.cart_button}>
|
||||
<img src={Cart} alt="carrinho de compra" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.header_bottom}>
|
||||
<button className={styles.header_bottom_button}>cursos</button>
|
||||
<button className={styles.header_bottom_button}>saiba mais</button>
|
||||
<button className={styles.header_bottom_button}>
|
||||
institucionais
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
</>
|
||||
);
|
||||
}
|
99
src/components/Header/styles.module.scss
Normal file
99
src/components/Header/styles.module.scss
Normal file
@ -0,0 +1,99 @@
|
||||
// --------------------- Header Top --------------------- //
|
||||
|
||||
.header_top {
|
||||
background: black;
|
||||
padding: 22px 0;
|
||||
color: white;
|
||||
|
||||
.first_div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.search {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
.header_button {
|
||||
display: flex;
|
||||
gap: 55px;
|
||||
padding-right: 7.81vw;
|
||||
height: 28px;
|
||||
|
||||
.button_entrar {
|
||||
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;
|
||||
}
|
||||
|
||||
.cart_button {
|
||||
cursor: pointer;
|
||||
background: black;
|
||||
height: 28px;
|
||||
border: 0;
|
||||
|
||||
img {
|
||||
display: flex;
|
||||
height: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.m3_logo {
|
||||
display: flex;
|
||||
padding-left: 7.81vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------- Header Bottom --------------------- //
|
||||
|
||||
.header_bottom {
|
||||
background: black;
|
||||
margin-top: 1px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 14px 0 14px 7.81vw;
|
||||
gap: 55px;
|
||||
|
||||
.header_bottom_button {
|
||||
background: black;
|
||||
color: white;
|
||||
border: 0;
|
||||
text-transform: uppercase;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
export default function Institutional() {
|
||||
return <div>bastente sexo</div>;
|
||||
return <div>teste 2</div>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user