Merge pull request 'development' (#11) from development into main
Reviewed-on: #11
23
desafio-react-typescript/.gitignore
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
46
desafio-react-typescript/README.md
Normal file
@ -0,0 +1,46 @@
|
||||
# Getting Started with Create React App
|
||||
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
|
||||
## Available Scripts
|
||||
|
||||
In the project directory, you can run:
|
||||
|
||||
### `npm start`
|
||||
|
||||
Runs the app in the development mode.\
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
|
||||
The page will reload if you make edits.\
|
||||
You will also see any lint errors in the console.
|
||||
|
||||
### `npm test`
|
||||
|
||||
Launches the test runner in the interactive watch mode.\
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
|
||||
### `npm run build`
|
||||
|
||||
Builds the app for production to the `build` folder.\
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
The build is minified and the filenames include the hashes.\
|
||||
Your app is ready to be deployed!
|
||||
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
### `npm run eject`
|
||||
|
||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
## Learn More
|
||||
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
17013
desafio-react-typescript/package-lock.json
generated
Normal file
50
desafio-react-typescript/package.json
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "desafio-react-typescript",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "^16.18.11",
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react-dom": "^18.0.10",
|
||||
"@types/react-text-mask": "^5.4.11",
|
||||
"formik": "^2.2.9",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-input-mask": "^2.0.4",
|
||||
"react-router-dom": "^6.6.1",
|
||||
"react-scripts": "5.0.1",
|
||||
"react-text-mask": "^5.5.0",
|
||||
"sass": "^1.57.1",
|
||||
"typescript": "^4.9.4",
|
||||
"web-vitals": "^2.1.4",
|
||||
"yup": "^0.32.11"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
42
desafio-react-typescript/public/index.html
Normal file
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
25
desafio-react-typescript/src/Paths.tsx
Normal file
@ -0,0 +1,25 @@
|
||||
import { Route, Routes } from "react-router-dom";
|
||||
import Contato from "./components/Main/components/Contato/Contato";
|
||||
import Entrega from "./components/Main/components/Entrega/Entrega";
|
||||
import FormaDePagamento from "./components/Main/components/FormaDePagamento/FormaDePagamento";
|
||||
import SegurancaEPrivacidade from "./components/Main/components/SegurancaEPrivacidade/SegurancaEPrivacidade";
|
||||
import Sobre from "./components/Main/components/Sobre/Sobre";
|
||||
import TrocaEDevolucao from "./components/Main/components/TrocaEDevolucao/TrocaEDevolucao";
|
||||
|
||||
const Paths = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="/" element={<Sobre />}></Route>
|
||||
<Route path="/formadepagamento" element={<FormaDePagamento />}></Route>
|
||||
<Route path="/entrega" element={<Entrega />}></Route>
|
||||
<Route path="/trocaedevolucao" element={<TrocaEDevolucao />} />
|
||||
<Route
|
||||
path="/segurancaeprivacidade"
|
||||
element={<SegurancaEPrivacidade />}
|
||||
></Route>
|
||||
<Route path="/contato" element={<Contato />}></Route>
|
||||
</Routes>
|
||||
);
|
||||
};
|
||||
|
||||
export default Paths;
|
BIN
desafio-react-typescript/src/assets/imgs/Logo-M3Academy.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
desafio-react-typescript/src/assets/imgs/amexM3Academy.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
desafio-react-typescript/src/assets/imgs/boletoM3Academy.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
desafio-react-typescript/src/assets/imgs/eloM3Academy.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
desafio-react-typescript/src/assets/imgs/hiperCardM3Academy.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
desafio-react-typescript/src/assets/imgs/logoM3M3Academy.png
Normal file
After Width: | Height: | Size: 445 B |
BIN
desafio-react-typescript/src/assets/imgs/logoVTEXM3Academy.png
Normal file
After Width: | Height: | Size: 550 B |
BIN
desafio-react-typescript/src/assets/imgs/masterCardM3Academy.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
desafio-react-typescript/src/assets/imgs/payPalM3Academy.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
desafio-react-typescript/src/assets/imgs/visaM3Academy.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
desafio-react-typescript/src/assets/imgs/vtexPCIM3Academy.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
10
desafio-react-typescript/src/assets/svgs/arrow-right.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 |
3
desafio-react-typescript/src/assets/svgs/arrow-up.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="13" height="7" viewBox="0 0 13 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.6 6.13647C12.5989 6.24898 12.5519 6.36118 12.4588 6.44888L12.4587 6.44902C12.2574 6.63896 11.9216 6.63894 11.7204 6.44903L11.7204 6.44902L6.7744 1.78259L6.4999 1.5236L6.2254 1.78259L1.27968 6.44882C1.27966 6.44884 1.27964 6.44886 1.27962 6.44888C1.07811 6.63886 0.742449 6.63877 0.541181 6.44888L0.541122 6.44882C0.448342 6.36133 0.401297 6.24944 0.400026 6.13719C0.401078 6.02468 0.448119 5.91242 0.541189 5.82462L0.541192 5.82461L6.13082 0.550956C6.13085 0.550933 6.13087 0.55091 6.13089 0.550887C6.22923 0.458193 6.36162 0.408533 6.49988 0.408533C6.63821 0.408533 6.77079 0.458327 6.86907 0.55102C6.86908 0.551029 6.86909 0.551037 6.8691 0.551047L12.4587 5.82475L12.4588 5.82482C12.5516 5.9124 12.5987 6.02428 12.6 6.13647Z" fill="white" stroke="white" stroke-width="0.8"/>
|
||||
</svg>
|
After Width: | Height: | Size: 891 B |
12
desafio-react-typescript/src/assets/svgs/carrinho.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_5048_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_5048_970">
|
||||
<rect width="28" height="28" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,4 @@
|
||||
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.2284 1.28215L1.22996 10.9942C0.550673 11.6541 0.568968 12.7044 1.27083 13.3401C1.97268 13.9759 3.09232 13.9564 3.77161 13.2966L13.77 3.58449C14.4493 2.92466 14.431 1.87436 13.7292 1.23858C13.0273 0.602806 11.9077 0.622311 11.2284 1.28215Z" fill="white"/>
|
||||
<path d="M1.65213 3.40819L10.8751 13.7186C11.5082 14.4263 12.6262 14.5239 13.3724 13.9366C14.1185 13.3493 14.2102 12.2995 13.5771 11.5918L4.35414 1.28143C3.72107 0.573715 2.603 0.476092 1.85686 1.06338C1.11072 1.65067 1.01906 2.70048 1.65213 3.40819Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 638 B |
16
desafio-react-typescript/src/assets/svgs/facebook.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5257_910)">
|
||||
<g clip-path="url(#clip1_5257_910)">
|
||||
<path d="M19.1778 27.4911V18.544H22.1734L22.6228 15.0561H19.1778V12.8296C19.1778 11.8201 19.4564 11.1321 20.9026 11.1321L22.7441 11.1314V8.01166C22.4256 7.97019 21.3325 7.87511 20.0602 7.87511C17.4034 7.87511 15.5845 9.50026 15.5845 12.4842V15.0561H12.5799V18.544H15.5845V27.4911H19.1778Z" fill="#303030"/>
|
||||
</g>
|
||||
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5257_910">
|
||||
<rect width="35" height="35" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_5257_910">
|
||||
<rect width="19.574" height="19.616" fill="white" transform="translate(7.87497 7.87509)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 803 B |
10
desafio-react-typescript/src/assets/svgs/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 |
18
desafio-react-typescript/src/assets/svgs/instagram.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5257_915)">
|
||||
<g clip-path="url(#clip1_5257_915)">
|
||||
<path d="M22.0996 7.87509H13.2966C10.3071 7.87509 7.87497 10.3036 7.87497 13.2884V22.0777C7.87497 25.0626 10.3071 27.491 13.2966 27.491H22.0996C25.0893 27.491 27.5214 25.0625 27.5214 22.0777V13.2884C27.5215 10.3036 25.0893 7.87509 22.0996 7.87509ZM25.7784 22.0777C25.7784 24.103 24.1281 25.7506 22.0997 25.7506H13.2966C11.2683 25.7507 9.6181 24.103 9.6181 22.0777V13.2884C9.6181 11.2632 11.2683 9.61551 13.2966 9.61551H22.0996C24.128 9.61551 25.7783 11.2632 25.7783 13.2884V22.0777H25.7784Z" fill="#303030"/>
|
||||
<path d="M17.6982 12.6288C14.9067 12.6288 12.6358 14.8962 12.6358 17.6833C12.6358 20.4703 14.9067 22.7376 17.6982 22.7376C20.4896 22.7376 22.7606 20.4703 22.7606 17.6833C22.7606 14.8962 20.4896 12.6288 17.6982 12.6288ZM17.6982 20.9971C15.868 20.9971 14.3789 19.5105 14.3789 17.6832C14.3789 15.8558 15.8679 14.3691 17.6982 14.3691C19.5285 14.3691 21.0175 15.8558 21.0175 17.6832C21.0175 19.5105 19.5284 20.9971 17.6982 20.9971Z" fill="#303030"/>
|
||||
<path d="M22.9729 11.1531C22.6371 11.1531 22.3072 11.2889 22.07 11.5267C21.8317 11.7634 21.6946 12.0929 21.6946 12.4294C21.6946 12.7648 21.8318 13.0942 22.07 13.3321C22.3071 13.5688 22.6371 13.7057 22.9729 13.7057C23.3099 13.7057 23.6388 13.5688 23.877 13.3321C24.1153 13.0942 24.2512 12.7647 24.2512 12.4294C24.2512 12.0929 24.1153 11.7634 23.877 11.5267C23.64 11.2889 23.3099 11.1531 22.9729 11.1531Z" fill="#303030"/>
|
||||
</g>
|
||||
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5257_915">
|
||||
<rect width="35" height="35" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_5257_915">
|
||||
<rect width="19.6465" height="19.616" fill="white" transform="translate(7.87497 7.87509)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
18
desafio-react-typescript/src/assets/svgs/linkedin.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5257_930)">
|
||||
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
|
||||
<g clip-path="url(#clip1_5257_930)">
|
||||
<path d="M13.4447 13.8592H10.2981C10.1584 13.8592 10.0453 13.9724 10.0453 14.112V24.2205C10.0453 24.3602 10.1584 24.4733 10.2981 24.4733H13.4447C13.5843 24.4733 13.6975 24.3602 13.6975 24.2205V14.112C13.6975 13.9724 13.5843 13.8592 13.4447 13.8592Z" fill="#303030"/>
|
||||
<path d="M11.8725 8.83394C10.7276 8.83394 9.7962 9.76436 9.7962 10.908C9.7962 12.0521 10.7276 12.9829 11.8725 12.9829C13.0165 12.9829 13.9472 12.0521 13.9472 10.908C13.9473 9.76436 13.0165 8.83394 11.8725 8.83394Z" fill="#303030"/>
|
||||
<path d="M21.4482 13.6079C20.1844 13.6079 19.2502 14.1512 18.6835 14.7685V14.112C18.6835 13.9724 18.5704 13.8592 18.4307 13.8592H15.4174C15.2777 13.8592 15.1646 13.9724 15.1646 14.112V24.2205C15.1646 24.3602 15.2777 24.4733 15.4174 24.4733H18.557C18.6967 24.4733 18.8098 24.3602 18.8098 24.2205V19.2191C18.8098 17.5338 19.2676 16.8772 20.4425 16.8772C21.722 16.8772 21.8236 17.9298 21.8236 19.3058V24.2206C21.8236 24.3602 21.9368 24.4734 22.0764 24.4734H25.2173C25.3569 24.4734 25.4701 24.3602 25.4701 24.2206V18.6759C25.4701 16.1698 24.9922 13.6079 21.4482 13.6079Z" fill="#303030"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5257_930">
|
||||
<rect width="35" height="35" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_5257_930">
|
||||
<rect width="15.6739" height="15.6739" fill="white" transform="translate(9.7962 8.8167)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
3
desafio-react-typescript/src/assets/svgs/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 |
@ -0,0 +1,5 @@
|
||||
<svg width="28" height="23" viewBox="0 0 28 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M26.25 19.0001H1.75002C0.783509 19.0001 0 19.7836 0 20.7501C0 21.7166 0.783508 22.5001 1.75002 22.5001H26.25C27.2165 22.5001 28 21.7166 28 20.7501C28 19.7836 27.2165 19.0001 26.25 19.0001Z" fill="white"/>
|
||||
<path d="M26.25 9.5H1.75002C0.783509 9.5 0 10.2835 0 11.25C0 12.2165 0.783508 13 1.75002 13H26.25C27.2165 13 28 12.2165 28 11.25C28 10.2835 27.2165 9.5 26.25 9.5Z" fill="white"/>
|
||||
<path d="M26.25 0H1.75002C0.783509 0 0 0.783509 0 1.75002C0 2.71652 0.783508 3.50003 1.75002 3.50003H26.25C27.2165 3.50003 28 2.71652 28 1.75002C28 0.783509 27.2165 0 26.25 0Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 688 B |
3
desafio-react-typescript/src/assets/svgs/plus.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="8" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.625 3.32031H7.79688V4.6875H4.625V8.28125H3.17188V4.6875H0V3.32031H3.17188V0H4.625V3.32031Z" fill="#303030"/>
|
||||
</svg>
|
After Width: | Height: | Size: 220 B |
11
desafio-react-typescript/src/assets/svgs/twitter.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5257_922)">
|
||||
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
|
||||
<path d="M29.9915 10.1563C29.0947 10.5497 28.1392 10.8104 27.143 10.937C28.1679 10.3251 28.95 9.36358 29.3178 8.20462C28.3623 8.7743 27.3073 9.1767 26.183 9.40126C25.2757 8.43521 23.9826 7.83688 22.572 7.83688C19.8351 7.83688 17.6317 10.0584 17.6317 12.7817C17.6317 13.1735 17.6648 13.5503 17.7462 13.909C13.6363 13.7086 9.99968 11.7388 7.55666 8.73813C7.13015 9.47812 6.87997 10.3251 6.87997 11.2369C6.87997 12.949 7.76163 14.4666 9.07583 15.3453C8.28158 15.3302 7.50241 15.0996 6.8423 14.7364C6.8423 14.7515 6.8423 14.7711 6.8423 14.7907C6.8423 17.193 8.55588 19.1884 10.803 19.6481C10.4006 19.7581 9.96201 19.8108 9.50686 19.8108C9.19037 19.8108 8.87086 19.7928 8.57095 19.7264C9.21147 21.6842 11.029 23.1235 13.1902 23.1702C11.5083 24.4859 9.37273 25.2786 7.06083 25.2786C6.65541 25.2786 6.26658 25.2605 5.87775 25.2108C8.06757 26.623 10.6628 27.4293 13.4615 27.4293C22.5584 27.4293 27.5319 19.8937 27.5319 13.3619C27.5319 13.1434 27.5243 12.9324 27.5138 12.7229C28.4949 12.0266 29.3193 11.157 29.9915 10.1563Z" fill="#303030"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5257_922">
|
||||
<rect width="35" height="35" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
11
desafio-react-typescript/src/assets/svgs/whatsapp.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_3715_5437)">
|
||||
<path d="M17.0042 0H16.9958C7.62238 0 0 7.6245 0 17C0 20.7188 1.1985 24.1655 3.23638 26.9641L1.11775 33.2796L7.65213 31.1908C10.3403 32.9715 13.5469 34 17.0042 34C26.3776 34 34 26.3734 34 17C34 7.62663 26.3776 0 17.0042 0Z" fill="#4CAF50"/>
|
||||
<path d="M26.8962 24.0061C26.486 25.1642 24.8583 26.1247 23.5599 26.4052C22.6717 26.5944 21.5114 26.7452 17.6057 25.126C12.6098 23.0562 9.39255 17.9796 9.1418 17.6502C8.90167 17.3209 7.12305 14.9621 7.12305 12.5226C7.12305 10.0831 8.36192 8.89524 8.8613 8.38524C9.27142 7.96661 9.9493 7.77536 10.5995 7.77536C10.8099 7.77536 10.999 7.78599 11.169 7.79449C11.6684 7.81574 11.9192 7.84549 12.2485 8.63386C12.6587 9.62199 13.6574 12.0615 13.7764 12.3122C13.8975 12.563 14.0187 12.903 13.8487 13.2324C13.6893 13.5724 13.549 13.7232 13.2983 14.0122C13.0475 14.3012 12.8095 14.5222 12.5588 14.8325C12.3293 15.1024 12.07 15.3914 12.359 15.8907C12.648 16.3795 13.6468 18.0094 15.1173 19.3184C17.0149 21.0077 18.5534 21.5475 19.1038 21.777C19.5139 21.947 20.0027 21.9066 20.3023 21.5879C20.6827 21.1777 21.1523 20.4977 21.6304 19.8284C21.9704 19.3481 22.3997 19.2886 22.8502 19.4586C23.3092 19.618 25.738 20.8186 26.2374 21.0672C26.7368 21.318 27.0662 21.437 27.1873 21.6474C27.3063 21.8577 27.3063 22.8459 26.8962 24.0061Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_3715_5437">
|
||||
<rect width="34" height="34" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
11
desafio-react-typescript/src/assets/svgs/youtube.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5257_927)">
|
||||
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
|
||||
<path d="M27.8027 12.2486C27.5447 11.2896 26.7886 10.5336 25.8297 10.2754C24.0779 9.79604 17.0706 9.79604 17.0706 9.79604C17.0706 9.79604 10.0636 9.79604 8.31176 10.2572C7.3713 10.5152 6.59672 11.2897 6.33875 12.2486C5.87775 14.0003 5.87775 17.633 5.87775 17.633C5.87775 17.633 5.87775 21.284 6.33875 23.0174C6.59699 23.9763 7.35285 24.7323 8.31189 24.9905C10.082 25.47 17.0709 25.47 17.0709 25.47C17.0709 25.47 24.0779 25.47 25.8297 25.0088C26.7887 24.7507 27.5447 23.9947 27.803 23.0358C28.2638 21.284 28.2638 17.6514 28.2638 17.6514C28.2638 17.6514 28.2823 14.0003 27.8027 12.2486ZM14.8396 20.989V14.277L20.6665 17.633L14.8396 20.989Z" fill="#303030"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5257_927">
|
||||
<rect width="35" height="35" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 976 B |
19
desafio-react-typescript/src/components/Footer/Footer.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import React from "react";
|
||||
import FooterBottom from "./components/FooterBottom/FooterBottom";
|
||||
import FooterTop from "./components/FooterTop.tsx/FooterTop";
|
||||
|
||||
import Newsletter from "./components/Newsletter/Newsletter";
|
||||
import ScrollLink from "./components/ScrollLink/ScrollLink";
|
||||
|
||||
const Footer = () => {
|
||||
return (
|
||||
<footer>
|
||||
<Newsletter />
|
||||
<FooterTop />
|
||||
<FooterBottom />
|
||||
<ScrollLink />
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
@ -0,0 +1,188 @@
|
||||
@import "../../../../styles/all.scss";
|
||||
|
||||
.footerBottom {
|
||||
padding: 20px 100px;
|
||||
background-color: $black;
|
||||
|
||||
@include display(flex, row, center, space-between);
|
||||
|
||||
@include mq($lg, max) {
|
||||
padding: 15px 16px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
padding: 24.5px 100px;
|
||||
}
|
||||
|
||||
&__razao-social-wrapper {
|
||||
width: 21.6666666667%;
|
||||
|
||||
@include mq($lg, max) {
|
||||
order: 2;
|
||||
min-width: 234px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 20.3043478%;
|
||||
}
|
||||
}
|
||||
|
||||
&__pagamento-wrapper {
|
||||
width: 36.90833333%;
|
||||
display: grid;
|
||||
grid-template-columns: 9.0314% 8.784% 8.784% 9.283% 8.784% 8.53% 9.0314% 1px 13.7%;
|
||||
column-gap: 12px;
|
||||
align-items: center;
|
||||
|
||||
@include mq($lg, max) {
|
||||
order: 1;
|
||||
width: 100%;
|
||||
|
||||
grid-template-columns:
|
||||
minmax(30px, 3.63%) minmax(30px, 3.529%) minmax(30px, 3.529%)
|
||||
minmax(30px, 3.73%) minmax(30px, 3.529%) minmax(30px, 3.428%) minmax(30px, 3.63%) 1px minmax(45px, 5.505%) ;
|
||||
}
|
||||
|
||||
@include mq($sm, max) {
|
||||
grid-template-columns: repeat(7, 8.75%) 1px 13.12%;
|
||||
column-gap: 11px;
|
||||
}
|
||||
|
||||
@include mq($cstm, max) {
|
||||
gap: 9px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 30.0869565%;
|
||||
grid-template-columns: repeat(7, 10.116%) 1px 15.32%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&__autores-wrapper {
|
||||
min-width: 226.58px;
|
||||
width: 20.97962%;
|
||||
@include display(flex, row, center, flex-end);
|
||||
|
||||
gap: 13px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
order: 3;
|
||||
|
||||
justify-content: start;
|
||||
width: 22.8407258%;
|
||||
min-width: 224.28px;
|
||||
}
|
||||
|
||||
@include mq($sm, max) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
gap: 12px;
|
||||
width: 17.5726086%;
|
||||
}
|
||||
}
|
||||
|
||||
&__razao-social,
|
||||
&__span {
|
||||
@include fontStyle(400, 10px, 12px, $white);
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(20px, 23px);
|
||||
}
|
||||
}
|
||||
|
||||
&__pagamento-divider {
|
||||
height: 24px;
|
||||
border-right: 1px solid $primary-600;
|
||||
|
||||
@include mq($sm, max) {
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
// &__pagamento-masterCard,
|
||||
// &__pagamento-boleto {
|
||||
// width: 9.0314%;
|
||||
|
||||
// @include mq($lg, max) {
|
||||
// width: 3.63%;
|
||||
// }
|
||||
// }
|
||||
|
||||
// &__pagamento-visa,
|
||||
// &__pagamento-amex,
|
||||
// &__pagamento-hiperCard {
|
||||
// width: 8.784%;
|
||||
|
||||
// @include mq($lg, max) {
|
||||
// width: 3.529%;
|
||||
// }
|
||||
// }
|
||||
|
||||
// &__pagamento-elo {
|
||||
// width: 9.283%;
|
||||
|
||||
// @include mq($lg, max) {
|
||||
// width: 3.73%;
|
||||
// }
|
||||
// }
|
||||
|
||||
// &__pagamento-payPal {
|
||||
// width: 8.562%;
|
||||
|
||||
// @include mq($lg, max) {
|
||||
// width: 3.428%;
|
||||
// }
|
||||
// }
|
||||
|
||||
// &__pagamento-vtexPCI {
|
||||
// width: 13.7%;
|
||||
|
||||
// @include mq($lg, max) {
|
||||
// width: 5.505%;
|
||||
// }
|
||||
// @include mq($sm, max) {
|
||||
// width: 13.71%;
|
||||
// }
|
||||
|
||||
// @include mq($xl, min) {
|
||||
// width: 15.35%;
|
||||
// }
|
||||
// }
|
||||
|
||||
// &__pagamento-masterCard,
|
||||
// &__pagamento-visa,
|
||||
// &__pagamento-amex,
|
||||
// &__pagamento-elo,
|
||||
// &__pagamento-hiperCard,
|
||||
// &__pagamento-payPal,
|
||||
// &__pagamento-boleto {
|
||||
// @include mq($sm, max) {
|
||||
// width: 11.41%;
|
||||
// }
|
||||
// @include mq($xl, min) {
|
||||
// width: 10.116%;
|
||||
// }
|
||||
// }
|
||||
|
||||
&__vtex {
|
||||
@include mq($xl, min) {
|
||||
width: 84.22px;
|
||||
}
|
||||
}
|
||||
|
||||
&__m3 {
|
||||
@include mq($xl, min) {
|
||||
width: 54.95px;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
import React from "react";
|
||||
|
||||
import masterCard from "../../../../assets/imgs/masterCardM3Academy.png";
|
||||
import visa from "../../../../assets/imgs/visaM3Academy.png";
|
||||
import amex from "../../../../assets/imgs/amexM3Academy.png";
|
||||
import elo from "../../../../assets/imgs/eloM3Academy.png";
|
||||
import hiperCard from "../../../../assets/imgs/hiperCardM3Academy.png";
|
||||
import payPal from "../../../../assets/imgs/payPalM3Academy.png";
|
||||
import boleto from "../../../../assets/imgs/boletoM3Academy.png";
|
||||
import vtexPCI from "../../../../assets/imgs/vtexPCIM3Academy.png";
|
||||
|
||||
import logoVTEX from "../../../../assets/imgs/logoVTEXM3Academy.png";
|
||||
import logoM3 from "../../../../assets/imgs/logoM3M3Academy.png";
|
||||
|
||||
import styles from "./FooterBottom.module.scss";
|
||||
|
||||
const FooterBottom = () => {
|
||||
return (
|
||||
<div className={styles["footerBottom"]}>
|
||||
<div className={styles["footerBottom__razao-social-wrapper"]}>
|
||||
<p className={styles["footerBottom__razao-social"]}>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
||||
eiusmod tempor
|
||||
</p>
|
||||
</div>
|
||||
<ul className={styles["footerBottom__pagamento-wrapper"]}>
|
||||
<li className={styles["footerBottom__pagamento-masterCard"]}>
|
||||
<img src={masterCard} alt="" />
|
||||
</li>
|
||||
<li className={styles["footerBottom__pagamento-visa"]}>
|
||||
<img src={visa} alt="" />
|
||||
</li>
|
||||
<li className={styles["footerBottom__pagamento-amex"]}>
|
||||
<img src={amex} alt="" />
|
||||
</li>
|
||||
<li className={styles["footerBottom__pagamento-elo"]}>
|
||||
<img src={elo} alt="" />
|
||||
</li>
|
||||
<li className={styles["footerBottom__pagamento-hiperCard"]}>
|
||||
<img src={hiperCard} alt="" />
|
||||
</li>
|
||||
<li className={styles["footerBottom__pagamento-payPal"]}>
|
||||
<img src={payPal} alt="" />
|
||||
</li>
|
||||
<li className={styles["footerBottom__pagamento-boleto"]}>
|
||||
<img src={boleto} alt="" />
|
||||
</li>
|
||||
<li className={styles["footerBottom__pagamento-divider"]}></li>
|
||||
<li className={styles["footerBottom__pagamento-vtexPCI"]}>
|
||||
<img src={vtexPCI} alt="" />
|
||||
</li>
|
||||
</ul>
|
||||
<div className={styles["footerBottom__autores-wrapper"]}>
|
||||
<span className={styles["footerBottom__span"]}>Powered By</span>
|
||||
<img className={styles["footerBottom__vtex"]} src={logoVTEX} alt="" />
|
||||
<span className={styles["footerBottom__span"]}>Developed By</span>
|
||||
<img className={styles["footerBottom__m3"]} src={logoM3} alt="" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default FooterBottom;
|
@ -0,0 +1,43 @@
|
||||
@import "../../../../styles/all.scss";
|
||||
|
||||
.footerTop {
|
||||
display: flex;
|
||||
gap: 158px;
|
||||
|
||||
padding: 50px 100px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
padding: 24px 16px;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
gap: 379px;
|
||||
}
|
||||
|
||||
&__menu-link-wrapper {
|
||||
width: 65.462964%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@include mq($lg, max) {
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 66.56521739%;
|
||||
}
|
||||
}
|
||||
|
||||
&__redes-sociais-wrapper {
|
||||
width: 19.9075%;
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 16.956521739%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,41 @@
|
||||
import React from "react";
|
||||
|
||||
import MenuListInfo from "./components/InfoFaleConosco";
|
||||
import RedesSociais from "./components/RedesSociais";
|
||||
|
||||
import styles from "./FooterTop.module.scss";
|
||||
import InfoLinks from "./components/InfoLinks";
|
||||
|
||||
const FooterTop = () => {
|
||||
return (
|
||||
<div className={styles["footerTop"]}>
|
||||
<div className={styles["footerTop__menu-link-wrapper"]}>
|
||||
<InfoLinks
|
||||
title="Institucional"
|
||||
list={[
|
||||
"Quem somos",
|
||||
"Política de Privacidade",
|
||||
"Segurança",
|
||||
"Seja um Revendedor",
|
||||
]}
|
||||
/>
|
||||
<InfoLinks
|
||||
title="Dúvidas"
|
||||
list={[
|
||||
"Entrega",
|
||||
"Pagamento",
|
||||
"Trocas e Devoluções",
|
||||
"Dúvidas Frequentes",
|
||||
]}
|
||||
/>
|
||||
<MenuListInfo />
|
||||
</div>
|
||||
|
||||
<div className={styles["footerTop__redes-sociais-wrapper"]}>
|
||||
<RedesSociais />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default FooterTop;
|
@ -0,0 +1,59 @@
|
||||
@import "../../../../../styles/all.scss";
|
||||
|
||||
.menu-list {
|
||||
width: 21.923623%;
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__unselect {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__title-wrapper {
|
||||
@include display(flex, row, center, space-between);
|
||||
|
||||
img {
|
||||
display: none;
|
||||
|
||||
@include mq($lg, max) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include fontStyle(500, 14px, 16px, $primary-200);
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 12px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 12px;
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(24px, 28px);
|
||||
}
|
||||
}
|
||||
|
||||
&__item {
|
||||
@include fontStyle(500, 12px, 14px, $primary-200);
|
||||
}
|
||||
|
||||
&__telephone {
|
||||
@include fontStyle(400, 12px, 14px, $primary-200);
|
||||
|
||||
:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import styles from "./InfoFaleConosco.module.scss";
|
||||
import plus from "../../../../../assets/svgs/plus.svg";
|
||||
|
||||
const InfoFaleConosco = () => {
|
||||
const verificarTamanhoDaWindow = () => {
|
||||
if (window.innerWidth <= 1024) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
const [isActive, setIsActive] = useState(verificarTamanhoDaWindow());
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener("resize", () => {
|
||||
if (window.innerWidth <= 1024) {
|
||||
setIsActive(false);
|
||||
} else {
|
||||
setIsActive(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
return (
|
||||
<section className={styles["menu-list"]}>
|
||||
<div className={styles["menu-list__title-wrapper"]}>
|
||||
<h4 className={styles["menu-list__title"]}>Fale Conosco</h4>
|
||||
<img
|
||||
src={plus}
|
||||
alt="Abrir/Fechar"
|
||||
onClick={() => setIsActive(!isActive)}
|
||||
/>
|
||||
</div>
|
||||
{isActive && (
|
||||
<ul
|
||||
className={
|
||||
isActive
|
||||
? `${styles["menu-list__container"]}`
|
||||
: `${styles["menu-list__unselect"]}`
|
||||
}
|
||||
>
|
||||
<li className={styles["menu-list__item"]}>
|
||||
Atendimento Ao Consumidor
|
||||
</li>
|
||||
<li className={styles["menu-list__telephone"]}>(11) 4159 9504</li>
|
||||
<li className={styles["menu-list__item"]}>Atendimento Online</li>
|
||||
<li className={styles["menu-list__telephone"]}>(11) 99433-8825</li>
|
||||
</ul>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default InfoFaleConosco;
|
@ -0,0 +1,57 @@
|
||||
@import "../../../../../styles/all.scss";
|
||||
|
||||
.menu-list {
|
||||
width: 21.923623%;
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__unselect {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__title-wrapper {
|
||||
@include display(flex, row, center, space-between);
|
||||
|
||||
img {
|
||||
display: none;
|
||||
|
||||
@include mq($lg, max) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include fontStyle(500, 14px, 16px, $primary-200);
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 12px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
&__item {
|
||||
@include fontStyle(400, 12px, 14px, $primary-200);
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(24px, 28px);
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 12px;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import styles from "./InfoLinks.module.scss";
|
||||
import plus from "../../../../../assets/svgs/plus.svg";
|
||||
|
||||
interface IInfoLinks {
|
||||
title: string;
|
||||
list: Array<string>;
|
||||
}
|
||||
|
||||
const InfoLinks = ({ title, list }: IInfoLinks) => {
|
||||
|
||||
const verificarTamanhoDaWindow = () => {
|
||||
if (window.innerWidth <= 1024) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
const [isActive, setIsActive] = useState(verificarTamanhoDaWindow());
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
window.addEventListener("resize", () => {
|
||||
if (window.innerWidth <= 1024) {
|
||||
setIsActive(false);
|
||||
} else {
|
||||
setIsActive(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return (
|
||||
<section className={styles["menu-list"]}>
|
||||
<div className={styles["menu-list__title-wrapper"]}>
|
||||
<h4 className={styles["menu-list__title"]}>{title}</h4>
|
||||
<img
|
||||
src={plus}
|
||||
alt="Abrir/Fechar"
|
||||
onClick={() => setIsActive(!isActive)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{isActive && <ul
|
||||
className={styles["menu-list__container"]}
|
||||
>
|
||||
{list.map((item, index) => {
|
||||
return (
|
||||
<li key={index}>
|
||||
<a className={styles["menu-list__item"]} href="/">
|
||||
{item}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>}
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default InfoLinks;
|
@ -0,0 +1,30 @@
|
||||
@import "../../../../../styles/all.scss";
|
||||
|
||||
.redes-sociais {
|
||||
&__container {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
&__item {
|
||||
img {
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__site {
|
||||
margin-top: 12px;
|
||||
@include fontStyle(400, 14px, 16px, $primary-200);
|
||||
|
||||
@include mq($lg, max) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
import React from "react";
|
||||
|
||||
import styles from "./RedesSociais.module.scss";
|
||||
import facebook from "../../../../../assets/svgs/facebook.svg";
|
||||
import instagram from "../../../../../assets/svgs/instagram.svg";
|
||||
import twitter from "../../../../../assets/svgs/twitter.svg";
|
||||
import youtube from "../../../../../assets/svgs/youtube.svg";
|
||||
import linkedin from "../../../../../assets/svgs/linkedin.svg";
|
||||
|
||||
const RedesSociais = () => {
|
||||
return (
|
||||
<div className={styles["redes-sociais"]}>
|
||||
<ul className={styles["redes-sociais__container"]}>
|
||||
<li>
|
||||
<a className={styles["redes-sociais__item"]} href="/">
|
||||
<img src={facebook} alt="logo do Facebook" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a className={styles["redes-sociais__item"]} href="/">
|
||||
<img src={instagram} alt="logo do Instagram" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a className={styles["redes-sociais__item"]} href="/">
|
||||
<img src={twitter} alt="logo do Twitter" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a className={styles["redes-sociais__item"]} href="/">
|
||||
<img src={youtube} alt="logo do Youtube" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a className={styles["redes-sociais__item"]} href="/">
|
||||
<img src={linkedin} alt="logo do linkedin" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p className={styles["redes-sociais__site"]}>www.loremipsum.com</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RedesSociais;
|
@ -0,0 +1,90 @@
|
||||
@import "../../../../styles/all.scss";
|
||||
|
||||
.newsletter {
|
||||
border-width: 1px 0px;
|
||||
border-style: solid;
|
||||
border-color: #000000;
|
||||
|
||||
&__wrapper {
|
||||
width: 37.03125%;
|
||||
margin: 16px auto;
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 100%;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 36.88%;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include fontStyle(500, 18px, 21px, $primary-200);
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 8px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
@include fontStyleResponsive(14px, 16px);
|
||||
margin-bottom: 16px;
|
||||
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(36px, 42px);
|
||||
}
|
||||
}
|
||||
|
||||
&__input {
|
||||
width: 71.7299578%;
|
||||
height: 42px;
|
||||
padding: 13px 16px;
|
||||
margin-right: 6px;
|
||||
@include borderStyle(1px, $primary-300, 4px);
|
||||
@include fontStyle(400, 14px, 16px, $black);
|
||||
|
||||
&::placeholder {
|
||||
color:$primary-600;
|
||||
}
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 72.4511930585%;
|
||||
height: 59px;
|
||||
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
&__button {
|
||||
width: 26.5822784%;
|
||||
height: 42px;
|
||||
background-color: $black;
|
||||
|
||||
padding: 14px 20px;
|
||||
|
||||
@include fontStyle(700, 12px, 14px, $white);
|
||||
text-transform: uppercase;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
|
||||
@include fontStyleResponsive(14px, 16px);
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
height: 59px;
|
||||
width: 26.6811279%;
|
||||
|
||||
@include fontStyleResponsive(24px, 28px);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import styles from "./Newsletter.module.scss";
|
||||
|
||||
export const Newsletter = () => {
|
||||
const [value, setValue] = useState("");
|
||||
return (
|
||||
<div className={styles["newsletter"]}>
|
||||
<div className={styles["newsletter__wrapper"]}>
|
||||
<h3 className={styles["newsletter__title"]}>Assine Nossa Newsletter</h3>
|
||||
<div className={styles["newsletter__input-container"]}>
|
||||
<input
|
||||
value={value}
|
||||
className={styles["newsletter__input"]}
|
||||
type="email"
|
||||
placeholder="E-mail"
|
||||
onChange={(e) => setValue(e.target.value)}
|
||||
/>
|
||||
<button className={styles["newsletter__button"]} onClick={() => setValue("")}>Enviar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Newsletter;
|
@ -0,0 +1,59 @@
|
||||
@import "../../../../styles/all.scss";
|
||||
|
||||
.scroll-link {
|
||||
background: red;
|
||||
|
||||
&__whatsapp {
|
||||
position: fixed;
|
||||
z-index: 15;
|
||||
bottom: 228px;
|
||||
right: 16px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
bottom: 59px;
|
||||
}
|
||||
|
||||
@include mq($sm, max) {
|
||||
bottom: 67px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
bottom: 300px;
|
||||
img {
|
||||
width: 64px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__up {
|
||||
background-color: $primary-600;
|
||||
position: fixed;
|
||||
z-index: 15;
|
||||
bottom: 189px;
|
||||
right: 16px;
|
||||
|
||||
border-radius: 50%;
|
||||
padding: 13px 10px 14px 11px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
|
||||
@include display(flex, row, center, center);
|
||||
|
||||
@include mq($lg, max) {
|
||||
bottom: 20px;
|
||||
}
|
||||
@include mq($sm, max) {
|
||||
bottom: 28px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
bottom: 229px;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
padding: 25px 20.86px 28px 21px;
|
||||
img {
|
||||
scale: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import whatsapp from "../../../../assets/svgs/whatsapp.svg";
|
||||
import arrowUp from "../../../../assets/svgs/arrow-up.svg";
|
||||
import styles from "./ScrollLink.module.scss";
|
||||
|
||||
const ScrollLink = () => {
|
||||
const [isShow, setisShow] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener("scroll", () => {
|
||||
if (window.scrollY > 129) {
|
||||
setisShow(true);
|
||||
} else {
|
||||
setisShow(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const scrollToTop = () => {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles["scroll-link"]}>
|
||||
<a className={styles["scroll-link__whatsapp"]} href="tel:22-99999-9999">
|
||||
<img src={whatsapp} alt="Logo do Whatsapp" />
|
||||
</a>
|
||||
{isShow && (
|
||||
<button className={styles["scroll-link__up"]} onClick={scrollToTop}>
|
||||
<img src={arrowUp} alt="Ir Para o começo da página" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ScrollLink;
|
@ -0,0 +1,3 @@
|
||||
.header {
|
||||
position: relative;
|
||||
}
|
30
desafio-react-typescript/src/components/Header/Header.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import HeaderBottom from "./components/HeaderBottom";
|
||||
import HeaderTop from "./components/HeaderTop";
|
||||
import styles from "./Header.module.scss";
|
||||
|
||||
const Header = () => {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener("resize", () => {
|
||||
if (window.innerWidth > 1024) {
|
||||
document.body.style.overflowY = "auto";
|
||||
}
|
||||
if (window.innerWidth <= 1024 && isOpen) {
|
||||
document.body.style.overflowY = "hidden";
|
||||
} else {
|
||||
document.body.style.overflowY = "auto";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return (
|
||||
<header className={styles["header"]}>
|
||||
<HeaderTop isOpen={isOpen} setIsOpen={setIsOpen} />
|
||||
<HeaderBottom isOpen={isOpen} setIsOpen={setIsOpen} />
|
||||
</header>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
@ -0,0 +1,87 @@
|
||||
@import "../../../styles/all.scss";
|
||||
|
||||
.headerBottom {
|
||||
border-top: 1px solid $primary-600;
|
||||
background: $black;
|
||||
|
||||
padding: 14px 100px;
|
||||
z-index: 20;
|
||||
|
||||
@include mq($lg, max) {
|
||||
position: absolute;
|
||||
background-color: rgba(69, 69, 69, 0.7);
|
||||
|
||||
top: 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
|
||||
left: -100%;
|
||||
|
||||
transition: all 0.3s linear;
|
||||
|
||||
}
|
||||
|
||||
&__active {
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__head {
|
||||
display: none;
|
||||
|
||||
@include mq($lg, max) {
|
||||
@include display(flex, row, center, space-between);
|
||||
padding: 31px 16px;
|
||||
background-color: $black;
|
||||
|
||||
width: 96.484375%;
|
||||
}
|
||||
|
||||
@include mq($sm, max) {
|
||||
width: 90.4%;
|
||||
}
|
||||
}
|
||||
|
||||
&__login {
|
||||
@include fontStyle(400, 14px, 16px, $white);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
&__container {
|
||||
display: flex;
|
||||
gap: 55px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
padding: 31px 16px;
|
||||
display: block;
|
||||
width: 96.484375%;
|
||||
height: 507px;
|
||||
|
||||
background-color: white;
|
||||
|
||||
li {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
@include mq($sm, max) {
|
||||
width: 90.4%;
|
||||
}
|
||||
}
|
||||
|
||||
&__content {
|
||||
@include fontStyle(500, 14px, 16px, $white);
|
||||
text-transform: uppercase;
|
||||
|
||||
@include mq($lg, max) {
|
||||
@include fontStyle(500, 14px, 16px, $primary-600);
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,57 @@
|
||||
import React, { useEffect } from "react";
|
||||
import styles from "./HeaderBottom.module.scss";
|
||||
|
||||
import close from "../../../assets/svgs/close-button.svg";
|
||||
|
||||
interface HeaderBottomProps {
|
||||
isOpen: boolean;
|
||||
setIsOpen(value: boolean): void;
|
||||
}
|
||||
|
||||
const HeaderBottom = ({ isOpen, setIsOpen }: HeaderBottomProps) => {
|
||||
useEffect(() => {
|
||||
if (window.innerWidth <= 1024) {
|
||||
document.body.style.overflowY = isOpen ? "hidden" : "auto";
|
||||
}
|
||||
}, [isOpen]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={
|
||||
isOpen
|
||||
? `${styles["headerBottom"]} ${styles["headerBottom__active"]}`
|
||||
: `${styles["headerBottom"]}`
|
||||
}
|
||||
onClick={() => setIsOpen(false)}
|
||||
>
|
||||
<div className={styles["headerBottom__head"]}>
|
||||
<p className={styles["headerBottom__login"]}>Entrar</p>
|
||||
<button
|
||||
className={styles["headerBottom__close-button "]}
|
||||
onClick={() => setIsOpen(false)}
|
||||
>
|
||||
<img src={close} alt="Fechar" />
|
||||
</button>
|
||||
</div>
|
||||
<ul className={styles["headerBottom__container"]}>
|
||||
<li>
|
||||
<a className={styles["headerBottom__content"]} href="/">
|
||||
Cursos
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a className={styles["headerBottom__content"]} href="/">
|
||||
Saiba Mais
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a className={styles["headerBottom__content"]} href="/">
|
||||
Institucionais
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HeaderBottom;
|
@ -0,0 +1,127 @@
|
||||
@import "../../../styles/all.scss";
|
||||
|
||||
|
||||
.headerTop {
|
||||
@include display(flex, row, center, space-between);
|
||||
|
||||
padding: 22px 100px;
|
||||
background: $black;
|
||||
|
||||
@include mq($lg, max) {
|
||||
padding: 25px 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__menu-container {
|
||||
display: none;
|
||||
@include mq($lg, max) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&__image-container {
|
||||
width: 12.59259259%;
|
||||
min-width: 100px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 13.709678%;
|
||||
}
|
||||
|
||||
@include mq($sm, max) {
|
||||
width: 39.650145%;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 11.549%;
|
||||
}
|
||||
}
|
||||
|
||||
&__image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__input-container {
|
||||
position: relative;
|
||||
width: 22.77777777778%;
|
||||
|
||||
@include mq($lg, max) {
|
||||
order: 3;
|
||||
width: 100%;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 22.4185%;
|
||||
}
|
||||
}
|
||||
|
||||
&__input {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
padding: 8px 44px 8px 16px;
|
||||
|
||||
@include borderStyle(2px, $primary-700, 5px);
|
||||
@include fontStyle(400, 14px, 16px, $black);
|
||||
|
||||
&::placeholder {
|
||||
color: $primary-500;
|
||||
}
|
||||
|
||||
@include mq($lg, max) {
|
||||
height: 35px;
|
||||
padding: 10px 44px 10px 16px ;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
height: 57px;
|
||||
padding: 12px 64px 12px 16px;
|
||||
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
&__lupa-wrapper {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
margin-right: 16px;
|
||||
transform: translateY(-50%);
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 35.15px;
|
||||
height: 35.15px;
|
||||
|
||||
margin-right: 16.47px;
|
||||
}
|
||||
}
|
||||
|
||||
&__login-container {
|
||||
@include display(flex, row, center, space-between);
|
||||
gap: 55px;
|
||||
}
|
||||
|
||||
&__login {
|
||||
@include fontStyle(400, 14px, 16px, $white);
|
||||
text-transform: uppercase;
|
||||
|
||||
@include mq($lg, max) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
&__minicart-container {
|
||||
@include mq($xl, min) {
|
||||
width: 54.68px;
|
||||
height: 54.68px;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import logoM3Academy from "../../../assets/imgs/Logo-M3Academy.png";
|
||||
import carrinho from "../../../assets/svgs/carrinho.svg";
|
||||
import lupa from "../../../assets/svgs/lupa.svg";
|
||||
import menu from "../../../assets/svgs/menu-hamburguer.svg";
|
||||
|
||||
import styles from "./HeaderTop.module.scss";
|
||||
|
||||
interface HeaderTopProps {
|
||||
isOpen: boolean;
|
||||
setIsOpen(value: boolean): void;
|
||||
}
|
||||
|
||||
const HeaderTop = ({ isOpen, setIsOpen }: HeaderTopProps) => {
|
||||
const [value, setValue] = useState("");
|
||||
|
||||
return (
|
||||
<div className={styles["headerTop"]}>
|
||||
<div className={styles["headerTop__menu-container"]}>
|
||||
<button
|
||||
className={styles["headerTop__menu-mobile"]}
|
||||
onClick={() => setIsOpen(true)}
|
||||
>
|
||||
<img className={styles["headerTop__menu"]} src={menu} alt="Menu" />
|
||||
</button>
|
||||
</div>
|
||||
<figure className={styles["headerTop__image-container"]}>
|
||||
<img
|
||||
className={styles["headerTop__image"]}
|
||||
src={logoM3Academy}
|
||||
alt="Logo da M3 Academy"
|
||||
/>
|
||||
</figure>
|
||||
<div className={styles["headerTop__input-container"]}>
|
||||
<input
|
||||
value={value}
|
||||
onChange={(e) => setValue(e.target.value)}
|
||||
className={styles["headerTop__input"]}
|
||||
type="search"
|
||||
placeholder="Buscar..."
|
||||
/>
|
||||
<button
|
||||
className={styles["headerTop__lupa-wrapper"]}
|
||||
onClick={() => setValue("")}
|
||||
>
|
||||
<img src={lupa} alt="Lupa" />
|
||||
</button>
|
||||
</div>
|
||||
<div className={styles["headerTop__login-container"]}>
|
||||
<a className={styles["headerTop__login"]} href="/">
|
||||
Entrar
|
||||
</a>
|
||||
<button className={styles["headerTop__minicart-container"]}>
|
||||
<img src={carrinho} alt="Carrinho" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HeaderTop;
|
@ -0,0 +1,65 @@
|
||||
@import "../../styles/all.scss";
|
||||
|
||||
.main {
|
||||
padding: 29px 100px 70px 100px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
padding: 29px 16px 81px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
padding-bottom: 84px;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__current-page {
|
||||
@include display(flex, row, center, flex-start);
|
||||
}
|
||||
|
||||
&__home {
|
||||
@include mq($xl, min) {
|
||||
width: 31.25px;
|
||||
height: 31.25px;
|
||||
}
|
||||
}
|
||||
|
||||
&__arrow-right {
|
||||
margin: 0 9.72px;
|
||||
|
||||
@include mq($xl, min) {
|
||||
margin: 0 8.38px 0 8.76px;
|
||||
width: 15.62px;
|
||||
height: 15.62px;
|
||||
}
|
||||
}
|
||||
|
||||
&__page {
|
||||
@include fontStyle(400, 12px, 14px, $primary-600);
|
||||
text-transform: uppercase;
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(24px, 28px);
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include fontStyle(400, 24px, 28px, $gray-900);
|
||||
letter-spacing: 0.1em;
|
||||
|
||||
padding: 80px 0;
|
||||
text-align: center;
|
||||
|
||||
@include mq($lg, max) {
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(48px, 56px);
|
||||
padding-top: 80.75px;
|
||||
}
|
||||
}
|
||||
}
|
28
desafio-react-typescript/src/components/Main/Main.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
import React from "react";
|
||||
import home from "../../assets/svgs/home.svg";
|
||||
import arrowRight from "../../assets/svgs/arrow-right.svg";
|
||||
import styles from "./Main.module.scss";
|
||||
import Informacoes from "./components/Informacoes";
|
||||
|
||||
const Main = () => {
|
||||
return (
|
||||
<main className={styles["main"]}>
|
||||
<div className={styles["main__current-page"]}>
|
||||
<a className={styles["main__home"]} href="/">
|
||||
<img src={home} alt="Casa" />
|
||||
</a>
|
||||
<span className={styles["main__arrow-right"]}>
|
||||
<img src={arrowRight} alt="" />
|
||||
</span>
|
||||
<a className={styles["main__page"]} href="/">
|
||||
Institucional
|
||||
</a>
|
||||
</div>
|
||||
<h1 className={styles["main__title"]}>INSTITUCIONAL</h1>
|
||||
|
||||
<Informacoes />
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
export default Main;
|
@ -0,0 +1,135 @@
|
||||
@import "../../../../styles/all.scss";
|
||||
|
||||
.contato {
|
||||
width: 69.2592592%;
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 73.04347826%;
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include fontStyle(700, 24px, 28px, $black);
|
||||
margin-bottom: 12px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(48px, 56px);
|
||||
}
|
||||
}
|
||||
|
||||
&__container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&__label {
|
||||
@include fontStyle(400, 14px, 16px, $black-500);
|
||||
margin: 0 0 0 15px;
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
&__field-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&__input {
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
@include fontStyle(400, 14px, 16px, $black);
|
||||
@include borderStyle(1px, $black-500, 25px);
|
||||
margin-bottom: 12px;
|
||||
margin-top: 12px;
|
||||
padding: 15px 20px;
|
||||
|
||||
&::placeholder {
|
||||
color: $gray-300;
|
||||
}
|
||||
@include mq($xl, min) {
|
||||
height: 63px;
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
&__span-agree {
|
||||
@include fontStyle(400, 14px, 16px, $primary-900);
|
||||
margin-right: 3px;
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
&__agree-wrapper {
|
||||
@include display(flex, row, flex-end, center);
|
||||
}
|
||||
|
||||
&__label-agree {
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
@include fontStyle(400, 14px, 16px, $black-500);
|
||||
margin-right: 4.28px;
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(28px, 33px);
|
||||
}
|
||||
}
|
||||
|
||||
&__agree {
|
||||
cursor: pointer;
|
||||
width: 18.64px;
|
||||
height: 18px;
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 36.4px;
|
||||
height: 35.15px;
|
||||
}
|
||||
}
|
||||
|
||||
&__button-submit {
|
||||
width: 100%;
|
||||
height: 52.44px;
|
||||
background: $black;
|
||||
|
||||
border-radius: 25px;
|
||||
|
||||
padding: 17px 0 16.44px;
|
||||
margin-top: 12px;
|
||||
|
||||
@include fontStyle(400, 16px, 19px, $white);
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(32px, 38px);
|
||||
height: 71px;
|
||||
padding: 16px 0 17px;
|
||||
}
|
||||
}
|
||||
|
||||
&__error {
|
||||
@include fontStyle(400, 12px, 14px, $primary-900);
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 20px;
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(24px, 28px);
|
||||
}
|
||||
}
|
||||
|
||||
&__sucess {
|
||||
margin-top: 12.56px;
|
||||
@include fontStyle(400, 12px, 14px, $green-500);
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(24px, 28px);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,223 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { Formik, Form, Field, ErrorMessage } from "formik";
|
||||
import FormikSchema from "../../../../schema/ContatoSchema";
|
||||
import MaskedInput from "react-text-mask";
|
||||
import styles from "./Contato.module.scss";
|
||||
|
||||
const phoneNumberMask = [
|
||||
"(",
|
||||
/[1-9]/,
|
||||
/\d/,
|
||||
")",
|
||||
" ",
|
||||
/\d/,
|
||||
/\d/,
|
||||
/\d/,
|
||||
/\d/,
|
||||
/\d/,
|
||||
"-",
|
||||
/\d/,
|
||||
/\d/,
|
||||
/\d/,
|
||||
/\d/,
|
||||
];
|
||||
|
||||
const cpfMask = [
|
||||
/\d/,
|
||||
/\d/,
|
||||
/\d/,
|
||||
".",
|
||||
/\d/,
|
||||
/\d/,
|
||||
/\d/,
|
||||
".",
|
||||
/\d/,
|
||||
/\d/,
|
||||
/\d/,
|
||||
"-",
|
||||
/\d/,
|
||||
/\d/,
|
||||
];
|
||||
|
||||
const dateMask = [/\d/, /\d/, ".", /\d/, /\d/, ".", /\d/, /\d/, /\d/, /\d/];
|
||||
interface IForm {
|
||||
name: string;
|
||||
email: string;
|
||||
cpf: string;
|
||||
dateBirth: string;
|
||||
telephone: string;
|
||||
instagram: string;
|
||||
agree: boolean;
|
||||
}
|
||||
|
||||
const initialValues = {
|
||||
name: "",
|
||||
email: "",
|
||||
cpf: "",
|
||||
dateBirth: "",
|
||||
telephone: "",
|
||||
instagram: "",
|
||||
agree: false,
|
||||
};
|
||||
|
||||
const Contato = () => {
|
||||
const [isValidate, setIsValidate] = useState(false);
|
||||
return (
|
||||
<div className={styles["contato"]}>
|
||||
<Formik
|
||||
onSubmit={(values: IForm, actions) => {
|
||||
actions.resetForm();
|
||||
if(values.agree === true && values.cpf !== "" && values.dateBirth !== "" && values.telephone !== "" && values.email !== "" && values.name !== "") {
|
||||
setIsValidate(true);
|
||||
}
|
||||
}}
|
||||
initialValues={initialValues}
|
||||
validationSchema={FormikSchema}
|
||||
>
|
||||
{() => (
|
||||
<Form>
|
||||
<h2 className={styles["contato__title"]}>Preencha o formulário</h2>
|
||||
<div className={styles["contato__container"]}>
|
||||
<div className={styles["contato__field-wrapper"]}>
|
||||
<label className={styles["contato__label"]} htmlFor="name">
|
||||
Nome
|
||||
</label>
|
||||
<Field
|
||||
className={styles["contato__input"]}
|
||||
name="name"
|
||||
id="name"
|
||||
placeholder="Seu nome completo"
|
||||
/>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
className={styles["contato__error"]}
|
||||
name="name"
|
||||
/>
|
||||
</div>
|
||||
<div className={styles["contato__field-wrapper"]}>
|
||||
<label className={styles["contato__label"]} htmlFor="email">
|
||||
E-mail
|
||||
</label>
|
||||
<Field
|
||||
className={styles["contato__input"]}
|
||||
name="email"
|
||||
id="email"
|
||||
placeholder="Seu e-mail"
|
||||
/>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
className={styles["contato__error"]}
|
||||
name="email"
|
||||
/>
|
||||
</div>
|
||||
<div className={styles["contato__field-wrapper"]}>
|
||||
<label className={styles["contato__label"]} htmlFor="cpf">
|
||||
CPF
|
||||
</label>
|
||||
<Field
|
||||
name="cpf"
|
||||
render={({ field }: any) => (
|
||||
<MaskedInput
|
||||
{...field}
|
||||
placeholder="000.000.000-00"
|
||||
mask={cpfMask}
|
||||
id="cpf"
|
||||
className={styles["contato__input"]}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
className={styles["contato__error"]}
|
||||
name="cpf"
|
||||
/>
|
||||
</div>
|
||||
<div className={styles["contato__field-wrapper"]}>
|
||||
<label className={styles["contato__label"]} htmlFor="dateBirth">
|
||||
Data de Nascimento:
|
||||
</label>
|
||||
<Field
|
||||
name="dateBirth"
|
||||
render={({ field }: any) => (
|
||||
<MaskedInput
|
||||
{...field}
|
||||
placeholder="00.00.0000"
|
||||
id="dateBirth"
|
||||
className={styles["contato__input"]}
|
||||
mask={dateMask}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
className={styles["contato__error"]}
|
||||
name="dateBirth"
|
||||
/>
|
||||
</div>
|
||||
<div className={styles["contato__field-wrapper"]}>
|
||||
<label className={styles["contato__label"]} htmlFor="telephone">
|
||||
Telefone:
|
||||
</label>
|
||||
<Field
|
||||
name="telephone"
|
||||
render={({ field }: any) => (
|
||||
<MaskedInput
|
||||
{...field}
|
||||
id="telephone"
|
||||
className={styles["contato__input"]}
|
||||
placeholder="(00) 00000-0000"
|
||||
mask={phoneNumberMask}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
className={styles["contato__error"]}
|
||||
name="telephone"
|
||||
/>
|
||||
</div>
|
||||
<div className={styles["contato__field-wrapper"]}>
|
||||
<label className={styles["contato__label"]} htmlFor="instagram">
|
||||
Instagram
|
||||
</label>
|
||||
<Field
|
||||
className={styles["contato__input"]}
|
||||
name="instagram"
|
||||
id="instagram"
|
||||
placeholder="@seuuser"
|
||||
/>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
className={styles["contato__error"]}
|
||||
name="instagram"
|
||||
/>
|
||||
</div>
|
||||
<div className={styles["contato__agree-wrapper"]}>
|
||||
<span className={styles["contato__span-agree"]}>*</span>
|
||||
<label
|
||||
className={styles["contato__label-agree"]}
|
||||
htmlFor="agree"
|
||||
>
|
||||
Declaro que li e aceito
|
||||
</label>
|
||||
<Field
|
||||
className={styles["contato__agree"]}
|
||||
type="checkbox"
|
||||
name="agree"
|
||||
id="agree"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<button className={styles["contato__button-submit"]} type="submit">
|
||||
CADASTRE-SE
|
||||
</button>
|
||||
{isValidate && <p className={styles["contato__sucess"]}>*Formulário enviado com sucesso!</p>}
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Contato;
|
@ -0,0 +1,39 @@
|
||||
import React from "react";
|
||||
import styles from "../Informacoes.module.scss";
|
||||
|
||||
const Entrega = () => {
|
||||
return (
|
||||
<div className={styles["content-subject"]}>
|
||||
<h2 className={styles["content-subject__title"]}>Entrega</h2>
|
||||
<p className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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>
|
||||
);
|
||||
};
|
||||
|
||||
export default Entrega;
|
@ -0,0 +1,40 @@
|
||||
import React from "react";
|
||||
import styles from "../Informacoes.module.scss";
|
||||
|
||||
|
||||
const FormaDePagamento = () => {
|
||||
return (
|
||||
<div className={styles["content-subject"]}>
|
||||
<h2 className={styles["content-subject__title"]}>Forma De Pagamento</h2>
|
||||
<p className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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>
|
||||
);
|
||||
};
|
||||
|
||||
export default FormaDePagamento;
|
@ -0,0 +1,88 @@
|
||||
@import "../../../styles/all.scss";
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
gap: 30px;
|
||||
|
||||
|
||||
@include mq($lg, max) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.content-list {
|
||||
border-right: 1px solid $black;
|
||||
width: 27.96296296%;
|
||||
max-height: 285px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 100%;
|
||||
border: none;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 25.652189%;
|
||||
max-height: 465px;
|
||||
}
|
||||
|
||||
&__navlink {
|
||||
background-color: white;
|
||||
padding: 10px 16px;
|
||||
display: block;
|
||||
width: 100% !important;
|
||||
|
||||
@include fontStyle(400, 16px, 19px, $gray-500);
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(32px, 38px);
|
||||
}
|
||||
|
||||
&[aria-current="page"] {
|
||||
background-color: $black;
|
||||
@include fontStyle(700, 16px, 19px, $white);
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(32px, 38px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.content-subject {
|
||||
width: 69.2592592%;
|
||||
|
||||
@include mq($lg, max) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
width: 73.04347826%;
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include fontStyle(700, 24px, 28px, $gray-900);
|
||||
margin-bottom: 12px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(48px, 56px);
|
||||
}
|
||||
}
|
||||
|
||||
&__content {
|
||||
@include fontStyle(400, 13px, 15px, $gray-500);
|
||||
margin-bottom: 15px;
|
||||
|
||||
@include mq($lg, max) {
|
||||
@include fontStyleResponsive(12px, 18px);
|
||||
}
|
||||
|
||||
@include mq($xl, min) {
|
||||
@include fontStyleResponsive(26px, 30px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
import React from "react";
|
||||
import { BrowserRouter, NavLink } from "react-router-dom";
|
||||
import styles from "./Informacoes.module.scss";
|
||||
import "./navlink.scss";
|
||||
import Paths from "../../../Paths";
|
||||
|
||||
const Informacoes = () => {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<div className={styles["container"]}>
|
||||
<div className={styles["content-list"]}>
|
||||
<ul className={styles["content-list__container"]}>
|
||||
<li>
|
||||
<NavLink to="/" className={styles["content-list__navlink"]}>
|
||||
Sobre
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink
|
||||
to="/formadepagamento"
|
||||
className={styles["content-list__navlink"]}
|
||||
>
|
||||
Forma de Pagamento
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink
|
||||
to="/entrega"
|
||||
className={styles["content-list__navlink"]}
|
||||
>
|
||||
Entrega
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink
|
||||
to="/trocaedevolucao"
|
||||
className={styles["content-list__navlink"]}
|
||||
>
|
||||
Troca e Devolução
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink
|
||||
to="/segurancaeprivacidade"
|
||||
className={styles["content-list__navlink"]}
|
||||
>
|
||||
Segurança e Privacidade
|
||||
</NavLink>
|
||||
</li>
|
||||
<li>
|
||||
<NavLink
|
||||
to="/contato"
|
||||
className={styles["content-list__navlink"]}
|
||||
>
|
||||
Contato
|
||||
</NavLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<Paths />
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
);
|
||||
};
|
||||
|
||||
export default Informacoes;
|
@ -0,0 +1,40 @@
|
||||
import React from "react";
|
||||
import styles from "../Informacoes.module.scss";
|
||||
|
||||
|
||||
const SegurancaEPrivacidade = () => {
|
||||
return (
|
||||
<div className={styles["content-subject"]}>
|
||||
<h2 className={styles["content-subject__title"]}>Segurança e Privacidade</h2>
|
||||
<p className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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>
|
||||
);
|
||||
};
|
||||
|
||||
export default SegurancaEPrivacidade;
|
@ -0,0 +1,40 @@
|
||||
import React from "react";
|
||||
import styles from "../Informacoes.module.scss";
|
||||
|
||||
|
||||
const Sobre = () => {
|
||||
return (
|
||||
<div className={styles["content-subject"]}>
|
||||
<h2 className={styles["content-subject__title"]}>Sobre</h2>
|
||||
<p className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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>
|
||||
);
|
||||
};
|
||||
|
||||
export default Sobre;
|
@ -0,0 +1,40 @@
|
||||
import React from "react";
|
||||
import styles from "../Informacoes.module.scss";
|
||||
|
||||
|
||||
const TrocaEDevolucao = () => {
|
||||
return (
|
||||
<div className={styles["content-subject"]}>
|
||||
<h2 className={styles["content-subject__title"]}>Troca e Devolução</h2>
|
||||
<p className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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 className={styles["content-subject__content"]}>
|
||||
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>
|
||||
);
|
||||
};
|
||||
|
||||
export default TrocaEDevolucao;
|
@ -0,0 +1,13 @@
|
||||
.unselect {
|
||||
background-color: blue;
|
||||
}
|
||||
|
||||
.container {
|
||||
.content-list {
|
||||
&__container {
|
||||
[aria-current="page"] {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
desafio-react-typescript/src/index.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import "./styles/global.scss";
|
||||
|
||||
import { Institucional } from "./pages/Institucional";
|
||||
|
||||
const root = ReactDOM.createRoot(
|
||||
document.getElementById("root") as HTMLElement
|
||||
);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<Institucional />
|
||||
</React.StrictMode>
|
||||
);
|
16
desafio-react-typescript/src/pages/Institucional.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import React from "react";
|
||||
import Footer from "../components/Footer/Footer";
|
||||
import Header from "../components/Header/Header";
|
||||
import Main from "../components/Main/Main";
|
||||
|
||||
const Institucional = () => {
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
<Main />
|
||||
<Footer />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export { Institucional };
|
1
desafio-react-typescript/src/react-app-env.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
/// <reference types="react-scripts" />
|
26
desafio-react-typescript/src/schema/ContatoSchema.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import * as yup from "yup";
|
||||
|
||||
export default yup.object().shape({
|
||||
name: yup
|
||||
.string()
|
||||
.min(3, "*Digite no mínimo 3 letras")
|
||||
.required("*Campo Obrigatório"),
|
||||
email: yup.string().required("*Campo obrigatório").email("*E-mail Inválido"),
|
||||
cpf: yup
|
||||
.string()
|
||||
.matches(/^\d{3}\.\d{3}\.\d{3}-\d{2}/, "*CPF Inválido")
|
||||
.required("*Campo Obrigatório"),
|
||||
dateBirth: yup
|
||||
.string()
|
||||
.matches(/^\d{2}\.\d{2}\.\d{4}/, "*Data Invállida")
|
||||
.required("*Campo Obrigatório"),
|
||||
telephone: yup
|
||||
.string()
|
||||
.matches(/^\([1-9]{2}\) \d{5}-\d{4}$/, "*Número Inválido")
|
||||
.required("*Campo Obrigatório"),
|
||||
instagram: yup
|
||||
.string()
|
||||
.min(4, "*Digite no mínimo 4 caracteres")
|
||||
.matches(/^@(?!.*\.\.)(?!.*\.$)[^\W][\w.]{0,29}$/, "*User Inválido"),
|
||||
agree: yup.boolean().oneOf([true], ""),
|
||||
});
|
2
desafio-react-typescript/src/styles/all.scss
Normal file
@ -0,0 +1,2 @@
|
||||
@import "./mixins.scss";
|
||||
@import "variaveis.scss";
|
38
desafio-react-typescript/src/styles/global.scss
Normal file
@ -0,0 +1,38 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: "Roboto", sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
input,
|
||||
button {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
input[type="search"]::-webkit-search-decoration,
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-results-button,
|
||||
input[type="search"]::-webkit-search-results-decoration {
|
||||
display: none;
|
||||
}
|
31
desafio-react-typescript/src/styles/mixins.scss
Normal file
@ -0,0 +1,31 @@
|
||||
@mixin display($display, $fd, $al, $jc) {
|
||||
display: $display;
|
||||
flex-direction: $fd;
|
||||
align-items: $al;
|
||||
justify-content: $jc;
|
||||
}
|
||||
|
||||
@mixin fontStyle($fw, $fs, $lh, $fc) {
|
||||
font-weight: $fw;
|
||||
font-size: $fs;
|
||||
line-height: $lh;
|
||||
color: $fc;
|
||||
}
|
||||
|
||||
@mixin fontStyleResponsive($fs, $lh) {
|
||||
font-size: $fs;
|
||||
line-height: $lh;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@mixin borderStyle($bpx, $bc, $br) {
|
||||
border: $bpx solid $bc;
|
||||
border-radius: $br;
|
||||
}
|
||||
|
||||
@mixin mq($width, $type) {
|
||||
@media only screen and (#{$type}-width: $width) {
|
||||
@content;
|
||||
}
|
||||
}
|
27
desafio-react-typescript/src/styles/variaveis.scss
Normal file
@ -0,0 +1,27 @@
|
||||
//Color
|
||||
|
||||
$white: #fff;
|
||||
$black: #000;
|
||||
|
||||
$primary-100: #5200ff;
|
||||
$primary-200: #303030;
|
||||
$primary-300: #5e5e5e;
|
||||
$primary-400: #919191;
|
||||
$primary-500: #c6c6c6;
|
||||
$primary-600: #c4c4c4;
|
||||
$primary-700: #f2f2f2;
|
||||
$primary-800: #f9f9f9;
|
||||
$primary-900: #ff0000;
|
||||
|
||||
|
||||
$gray-300: #B9B7B7;
|
||||
$gray-500: #7d7d7d;
|
||||
$gray-900: #292929;
|
||||
$black-500: #100D0E;
|
||||
|
||||
$green-500: #008000;
|
||||
//media Queries
|
||||
$cstm: 350px;
|
||||
$sm: 375px;
|
||||
$lg: 1024px;
|
||||
$xl: 2500px;
|
26
desafio-react-typescript/tsconfig.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|