forked from M3-Academy/desafio-react-e-typescript
feat: made TabLayout
This commit is contained in:
parent
b26b517bdf
commit
3588f9d9c9
@ -9,6 +9,12 @@
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
|
10
src/assets/svg/Arrowright.svg
Normal file
10
src/assets/svg/Arrowright.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_1_310)">
|
||||
<path d="M6.11608 3.60396L2.6762 0.164193C2.45738 -0.0547314 2.10261 -0.0547314 1.8839 0.164193C1.66517 0.382921 1.66517 0.737679 1.8839 0.95639L4.92766 4.00006L1.88398 7.04362C1.66525 7.26244 1.66525 7.61716 1.88398 7.83589C2.10271 8.0547 2.45747 8.0547 2.67629 7.83589L6.11617 4.39607C6.22553 4.28665 6.28015 4.1434 6.28015 4.00008C6.28015 3.85668 6.22543 3.71332 6.11608 3.60396Z" fill="#C4C4C4"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1_310">
|
||||
<rect width="8" height="8" fill="white" transform="matrix(1 0 0 -1 0 8)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 669 B |
10
src/assets/svg/Home.svg
Normal file
10
src/assets/svg/Home.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_1_306)">
|
||||
<path d="M15.8326 7.59562L14.6903 6.4533L8.40431 0.167326C8.18118 -0.0557753 7.81942 -0.0557753 7.59628 0.167326L1.31028 6.4533L0.167381 7.59623C-0.0518699 7.82324 -0.0456085 8.185 0.18141 8.40425C0.402871 8.61814 0.753946 8.61814 0.975407 8.40425L1.14226 8.23623V15.4285C1.14226 15.7442 1.3981 16 1.71372 16H14.2857C14.6013 16 14.8572 15.7442 14.8572 15.4285V8.23623L15.0246 8.40368C15.2516 8.62293 15.6134 8.61664 15.8326 8.38965C16.0465 8.16819 16.0465 7.81708 15.8326 7.59562ZM9.71409 14.8571H6.28537V10.2855H9.71409V14.8571ZM13.7142 14.8571H10.857V9.71403C10.857 9.39841 10.6011 9.14256 10.2855 9.14256H5.7139C5.39829 9.14256 5.14244 9.39841 5.14244 9.71403V14.8571H2.28518V7.09334L7.99969 1.3788L13.7142 7.09334V14.8571Z" fill="#C4C4C4"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1_306">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 986 B |
@ -1,3 +1,102 @@
|
||||
import styles from "./styles.module.scss";
|
||||
import Homelogo from "../../assets/svg/Home.svg";
|
||||
import Arrowright from "../../assets/svg/Arrowright.svg";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function Home() {
|
||||
return <main>teste</main>;
|
||||
const [tabValue, setTabValue] = useState(0);
|
||||
return (
|
||||
<main>
|
||||
<div className={styles.bread_crumb}>
|
||||
<img src={Homelogo} alt="home logo" />
|
||||
<img src={Arrowright} alt="arrow point to right" />
|
||||
<h2>INSTITUCIONAL</h2>
|
||||
</div>
|
||||
<div className={styles.tab_title}>
|
||||
<h2>INSTITUCIONAL</h2>
|
||||
</div>
|
||||
<div className={styles.tab_layout}>
|
||||
<div className={styles.tabs}>
|
||||
<button
|
||||
className={tabValue === 0 ? styles.tab_active : ""}
|
||||
onClick={() => {
|
||||
setTabValue(0);
|
||||
}}
|
||||
>
|
||||
Sobre
|
||||
</button>
|
||||
<button
|
||||
className={tabValue === 1 ? styles.tab_active : ""}
|
||||
onClick={() => {
|
||||
setTabValue(1);
|
||||
}}
|
||||
>
|
||||
Forma de Pagamento
|
||||
</button>
|
||||
<button
|
||||
className={tabValue === 2 ? styles.tab_active : ""}
|
||||
onClick={() => {
|
||||
setTabValue(2);
|
||||
}}
|
||||
>
|
||||
Troca e Devolução
|
||||
</button>
|
||||
<button
|
||||
className={tabValue === 3 ? styles.tab_active : ""}
|
||||
onClick={() => {
|
||||
setTabValue(3);
|
||||
}}
|
||||
>
|
||||
Segurança e Privacidade
|
||||
</button>
|
||||
<button
|
||||
className={tabValue === 4 ? styles.tab_active : ""}
|
||||
onClick={() => {
|
||||
setTabValue(4);
|
||||
}}
|
||||
>
|
||||
Contato
|
||||
</button>
|
||||
</div>
|
||||
<div className={styles.tab_content}>
|
||||
{(tabValue === 0 ||
|
||||
tabValue === 1 ||
|
||||
tabValue === 2 ||
|
||||
tabValue === 3) && (
|
||||
<>
|
||||
<h2>Sobre</h2>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
||||
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
|
||||
enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
||||
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
|
||||
in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
||||
nulla pariatur. Excepteur sint occaecat cupidatat non proident,
|
||||
sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
<p>
|
||||
Sed ut perspiciatis unde omnis iste natus error sit voluptatem
|
||||
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa
|
||||
quae ab illo inventore veritatis et quasi architecto beatae
|
||||
vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia
|
||||
voluptas sit aspernatur aut odit aut fugit, sed quia
|
||||
consequuntur magni dolores eos qui ratione voluptatem sequi
|
||||
nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor
|
||||
sit amet, consectetur, adipisci velit, sed quia non numquam eius
|
||||
modi tempora incidunt ut labore et dolore magnam aliquam quaerat
|
||||
voluptatem.
|
||||
</p>
|
||||
<p>
|
||||
Ut enim ad minima veniam, quis nostrum exercitationem ullam
|
||||
corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
|
||||
consequatur? Quis autem vel eum iure reprehenderit qui in ea
|
||||
voluptate velit esse quam nihil molestiae consequatur, vel illum
|
||||
qui dolorem eum fugiat quo voluptas nulla pariatur?
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
75
src/components/Home/styles.module.scss
Normal file
75
src/components/Home/styles.module.scss
Normal file
@ -0,0 +1,75 @@
|
||||
.bread_crumb {
|
||||
gap: 9px;
|
||||
margin-top: 29px;
|
||||
margin-left: 7.8vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
h2 {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
color: #c4c4c4;
|
||||
}
|
||||
}
|
||||
|
||||
.tab_title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 80px 0;
|
||||
h2 {
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
}
|
||||
|
||||
.tab_layout {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 0 7.8vw;
|
||||
margin-bottom: 70px;
|
||||
|
||||
.tabs {
|
||||
margin-right: 30px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
white-space: nowrap;
|
||||
border-right: solid 1.5px black;
|
||||
|
||||
.tab_active {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
width: 302px;
|
||||
height: 39px;
|
||||
padding-left: 16px;
|
||||
background-color: white;
|
||||
color: #7d7d7d;
|
||||
text-align: start;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
line-height: 19px;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab_content {
|
||||
h2 {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 15.23px;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
color: #7d7d7d;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user