diff --git a/README.md b/README.md index 96b9d3b..d322d72 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,8 @@ # Desafio REACT e Typescript +Para rodar o projeto, use o no terminal: +cd react-project +npm start -## Getting started - -To make it easy for you to get started with GitLab, here's a list of recommended next steps. - -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin https://gitlab.com/m3-academy/fase-06/desafio-react-e-typescript.git -git branch -M main -git push -uf origin main -``` - -## Integrate with your tools - -- [ ] [Set up project integrations](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://gitlab.com/m3-academy/fase-06/desafio-react-e-typescript/-/settings/integrations) - -## Collaborate with your team - -- [ ] [Invite team members and collaborators](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Automatically merge when pipeline succeeds](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) - -## Test and Deploy - -Use the built-in continuous integration in GitLab. - -- [ ] [Get started with GitLab CI/CD](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://docs.gitlab.com/ee/ci/environments/protected_environments.html) - -*** - -# Editing this README - -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://gitlab.com/-/experiment/new_project_readme_content:6ad80019019932803f32a91ae13cb05b?https://www.makeareadme.com/) for this template. - -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. - +O projeto irá rodar localmente na porta 3000. diff --git a/react-project/README.md b/react-project/README.md deleted file mode 100644 index de5a25e..0000000 --- a/react-project/README.md +++ /dev/null @@ -1 +0,0 @@ -# REACT APP - INSTITUCIONAL diff --git a/react-project/package-lock.json b/react-project/package-lock.json index 128dd0d..f310550 100644 --- a/react-project/package-lock.json +++ b/react-project/package-lock.json @@ -20,6 +20,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-input-mask": "^2.0.4", + "react-modal": "^3.16.1", "react-router-dom": "^6.6.1", "react-scripts": "5.0.1", "react-text-mask": "^5.5.0", @@ -7827,6 +7828,11 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -15109,6 +15115,29 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "node_modules/react-modal": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz", + "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==", + "dependencies": { + "exenv": "^1.2.0", + "prop-types": "^15.7.2", + "react-lifecycles-compat": "^3.0.0", + "warning": "^4.0.3" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18", + "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18" + } + }, "node_modules/react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", @@ -24128,6 +24157,11 @@ "strip-final-newline": "^2.0.0" } }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" + }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -29264,6 +29298,22 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "react-modal": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz", + "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==", + "requires": { + "exenv": "^1.2.0", + "prop-types": "^15.7.2", + "react-lifecycles-compat": "^3.0.0", + "warning": "^4.0.3" + } + }, "react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", diff --git a/react-project/package.json b/react-project/package.json index 081aa34..8d8bcc3 100644 --- a/react-project/package.json +++ b/react-project/package.json @@ -15,6 +15,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-input-mask": "^2.0.4", + "react-modal": "^3.16.1", "react-router-dom": "^6.6.1", "react-scripts": "5.0.1", "react-text-mask": "^5.5.0", diff --git a/react-project/public/index.html b/react-project/public/index.html index 2923ec7..90fbfb0 100644 --- a/react-project/public/index.html +++ b/react-project/public/index.html @@ -1,5 +1,5 @@ - + @@ -9,34 +9,11 @@ content="Web site created using create-react-app" /> - - - - React App + + Desafio React M3 -
- +
diff --git a/react-project/public/logo512.png b/react-project/public/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/react-project/public/logo512.png and /dev/null differ diff --git a/react-project/src/App.tsx b/react-project/src/App.tsx index 773fa05..6354bed 100644 --- a/react-project/src/App.tsx +++ b/react-project/src/App.tsx @@ -1,4 +1,5 @@ import React from "react"; + import logo from "./logo.svg"; import "../src/assets/styles/global.scss"; import { Institucional } from "./pages/Institucional"; diff --git a/react-project/src/Declarations.d.ts b/react-project/src/Declarations.d.ts index b614a49..ff21304 100644 --- a/react-project/src/Declarations.d.ts +++ b/react-project/src/Declarations.d.ts @@ -1 +1,2 @@ declare module "react-text-mask"; +declare module "react-modal"; diff --git a/react-project/src/assets/styles/variables.scss b/react-project/src/assets/styles/variables.scss index b14bee3..cf335db 100644 --- a/react-project/src/assets/styles/variables.scss +++ b/react-project/src/assets/styles/variables.scss @@ -12,6 +12,8 @@ --gray-200: #7d7d7d; --gray-300: #e5e5e5; --gray-400: #b9b7b7; + --gray-500: #f2f2f2; + --gray-600: #c6c6c6; --red-100: #ff0000; diff --git a/react-project/src/components/Footer.tsx b/react-project/src/components/Footer/Footer.tsx similarity index 84% rename from react-project/src/components/Footer.tsx rename to react-project/src/components/Footer/Footer.tsx index 09fef9a..354d4b6 100644 --- a/react-project/src/components/Footer.tsx +++ b/react-project/src/components/Footer/Footer.tsx @@ -1,5 +1,3 @@ -import React from "react"; - import { Newsletter } from "./Newsletter"; const Footer = () => { diff --git a/react-project/src/components/Newsletter.tsx b/react-project/src/components/Footer/Newsletter.tsx similarity index 94% rename from react-project/src/components/Newsletter.tsx rename to react-project/src/components/Footer/Newsletter.tsx index 75a9a5b..f2c7f57 100644 --- a/react-project/src/components/Newsletter.tsx +++ b/react-project/src/components/Footer/Newsletter.tsx @@ -1,4 +1,4 @@ -import newsletter from "../assets/styles/modules/Newsletter.module.scss"; +import newsletter from "./assets/modules/Newsletter.module.scss"; import { Formik, Form, Field, ErrorMessage } from "formik"; diff --git a/react-project/src/assets/styles/modules/Newsletter.module.scss b/react-project/src/components/Footer/assets/modules/Newsletter.module.scss similarity index 100% rename from react-project/src/assets/styles/modules/Newsletter.module.scss rename to react-project/src/components/Footer/assets/modules/Newsletter.module.scss diff --git a/react-project/src/components/Header.tsx b/react-project/src/components/Header.tsx deleted file mode 100644 index b4c852b..0000000 --- a/react-project/src/components/Header.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from "react"; - -const Header = () => { - return
Header
; -}; - -export { Header }; diff --git a/react-project/src/components/Header/Cart.tsx b/react-project/src/components/Header/Cart.tsx new file mode 100644 index 0000000..8eea37f --- /dev/null +++ b/react-project/src/components/Header/Cart.tsx @@ -0,0 +1,15 @@ +import cart from "./assets/svgs/cart.svg"; + +import cartStyle from "./assets/modules/Cart.module.scss"; + +const Cart = () => { + return ( + +
+ Carrinho de compras +
+
+ ); +}; + +export { Cart }; diff --git a/react-project/src/components/Header/Hamburguer.tsx b/react-project/src/components/Header/Hamburguer.tsx new file mode 100644 index 0000000..247d859 --- /dev/null +++ b/react-project/src/components/Header/Hamburguer.tsx @@ -0,0 +1,49 @@ +import { useState } from "react"; +import Modal from "react-modal"; + +import hamburguer from "./assets/modules/Hamburguer.module.scss"; + +import hamb from "./assets/svgs/hamburguer.svg"; +import close from "./assets/svgs/close.svg"; + +const Hamburguer = () => { + const [hambActive, setHamb] = useState(false); + const HambMode = () => { + setHamb(!hambActive); + }; + + return ( + <> + + +
+ ENTRAR + +
+ + +
+ + ); +}; + +export { Hamburguer }; diff --git a/react-project/src/components/Header/Header.tsx b/react-project/src/components/Header/Header.tsx new file mode 100644 index 0000000..4cfcb22 --- /dev/null +++ b/react-project/src/components/Header/Header.tsx @@ -0,0 +1,31 @@ +import header from "./assets/modules/Header.module.scss"; + +import { Logo } from "./Logo"; +import { SearchInput } from "./SearchInput"; +import { Cart } from "./Cart"; +import { Menu } from "./Menu"; + +const Header = () => { + return ( +
+
+
+ + + + + +
+
+ + +
+ ); +}; + +export { Header }; diff --git a/react-project/src/components/Header/HeaderMobile.tsx b/react-project/src/components/Header/HeaderMobile.tsx new file mode 100644 index 0000000..a2372f5 --- /dev/null +++ b/react-project/src/components/Header/HeaderMobile.tsx @@ -0,0 +1,23 @@ +import headerMobile from "./assets/modules/HeaderMobile.module.scss"; + +import { Hamburguer } from "./Hamburguer"; +import { Logo } from "./Logo"; +import { Cart } from "./Cart"; +import { SearchInput } from "./SearchInput"; + +const HeaderMobile = () => { + return ( +
+
+ + + +
+
+ +
+
+ ); +}; + +export { HeaderMobile }; diff --git a/react-project/src/components/Header/Logo.tsx b/react-project/src/components/Header/Logo.tsx new file mode 100644 index 0000000..8718b4a --- /dev/null +++ b/react-project/src/components/Header/Logo.tsx @@ -0,0 +1,15 @@ +import logo from "./assets/svgs/logo.svg"; + +import logoStyle from "./assets/modules/Logo.module.scss"; + +const Logo = () => { + return ( + +
+ Logo M3 Academy +
+
+ ); +}; + +export { Logo }; diff --git a/react-project/src/components/Header/Menu.tsx b/react-project/src/components/Header/Menu.tsx new file mode 100644 index 0000000..286435f --- /dev/null +++ b/react-project/src/components/Header/Menu.tsx @@ -0,0 +1,21 @@ +import menu from "./assets/modules/Menu.module.scss"; + +const Menu = () => { + return ( + + ); +}; + +export { Menu }; diff --git a/react-project/src/components/Header/SearchInput.tsx b/react-project/src/components/Header/SearchInput.tsx new file mode 100644 index 0000000..9fe1ad8 --- /dev/null +++ b/react-project/src/components/Header/SearchInput.tsx @@ -0,0 +1,30 @@ +import search from "./assets/svgs/search.svg"; +import searchStyle from "./assets/modules/SearchInput.module.scss"; + +import { Formik, Form, Field, ErrorMessage } from "formik"; + +interface ISearchType { + search: string; +} + +const SearchInput = () => { + return ( +
+ { + actions.resetForm(); + }} + initialValues={{ search: "" }} + > +
+ + + +
+
+ ); +}; + +export { SearchInput }; diff --git a/react-project/src/components/Header/assets/modules/Cart.module.scss b/react-project/src/components/Header/assets/modules/Cart.module.scss new file mode 100644 index 0000000..a1cf729 --- /dev/null +++ b/react-project/src/components/Header/assets/modules/Cart.module.scss @@ -0,0 +1,14 @@ +.cart { + display: contents; + + figure { + display: contents; + + img { + @media screen and (min-width: 2500px) { + width: 54.68px; + height: 54.68px; + } + } + } +} diff --git a/react-project/src/components/Header/assets/modules/Hamburguer.module.scss b/react-project/src/components/Header/assets/modules/Hamburguer.module.scss new file mode 100644 index 0000000..cbc395b --- /dev/null +++ b/react-project/src/components/Header/assets/modules/Hamburguer.module.scss @@ -0,0 +1,68 @@ +.hamburguer { + display: contents; + cursor: pointer; + + img { + width: 28px; + height: 22.5px; + } +} + +.content { + position: absolute; + background-color: var(--white); + width: 97.4609%; + height: 585px; + + &__top { + display: flex; + justify-content: space-between; + padding: 31px 16px; + background-color: var(--black); + a { + font-weight: 400; + font-size: 14px; + line-height: 16px; + color: var(--white); + text-decoration: none; + } + + button { + background: none; + border: 0; + display: contents; + cursor: pointer; + + img { + width: 15px; + height: 15px; + } + } + } + + ul { + padding: 31px 16px; + list-style: none; + + li { + margin-bottom: 12px; + + a { + color: var(--gray-100); + text-decoration: none; + font-weight: 500; + font-size: 14px; + line-height: 16px; + } + } + } +} + +.overlay { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: rgba(69, 69, 69, 0.7); +} diff --git a/react-project/src/components/Header/assets/modules/Header.module.scss b/react-project/src/components/Header/assets/modules/Header.module.scss new file mode 100644 index 0000000..429c023 --- /dev/null +++ b/react-project/src/components/Header/assets/modules/Header.module.scss @@ -0,0 +1,42 @@ +.header-desktop { + background-color: var(--black); + display: flex; + flex-direction: column; + color: var(--white); + + @media screen and (max-width: 1024px) { + display: none; + } + + .spread { + border-bottom: 1px solid var(--gray-100); + } + + .header { + margin-left: 100px; + margin-right: 100px; + display: flex; + justify-content: space-between; + padding: 22px 0; + align-items: center; + + &__account { + display: flex; + align-items: center; + gap: 55px; + + &__login { + color: var(--white); + font-weight: 400; + font-size: 14px; + line-height: 16px; + text-decoration: none; + + @media screen and (min-width: 2500px) { + font-size: 28px; + line-height: 33px; + } + } + } + } +} diff --git a/react-project/src/components/Header/assets/modules/HeaderMobile.module.scss b/react-project/src/components/Header/assets/modules/HeaderMobile.module.scss new file mode 100644 index 0000000..b90d5ad --- /dev/null +++ b/react-project/src/components/Header/assets/modules/HeaderMobile.module.scss @@ -0,0 +1,21 @@ +.header-mobile { + background-color: var(--black); + display: flex; + flex-direction: column; + color: var(--white); + + @media screen and (min-width: 1025px) { + display: none; + } + + &__header { + display: flex; + justify-content: space-between; + padding: 25px 16px; + align-items: center; + } + + &__input { + padding: 0 16px 25px; + } +} diff --git a/react-project/src/components/Header/assets/modules/Logo.module.scss b/react-project/src/components/Header/assets/modules/Logo.module.scss new file mode 100644 index 0000000..2acbcfb --- /dev/null +++ b/react-project/src/components/Header/assets/modules/Logo.module.scss @@ -0,0 +1,17 @@ +.logo { + display: contents; + + figure { + display: contents; + + img { + width: 136px; + height: 25.86px; + + @media screen and (min-width: 2500px) { + width: 265.62px; + height: 50.5px; + } + } + } +} diff --git a/react-project/src/components/Header/assets/modules/Menu.module.scss b/react-project/src/components/Header/assets/modules/Menu.module.scss new file mode 100644 index 0000000..3538177 --- /dev/null +++ b/react-project/src/components/Header/assets/modules/Menu.module.scss @@ -0,0 +1,27 @@ +.menu { + margin-left: 100px; + margin-right: 100px; + display: flex; + padding: 14px 0; + + ul { + display: flex; + gap: 55px; + list-style: none; + + li { + a { + font-weight: 500; + font-size: 14px; + line-height: 16px; + color: var(--white); + text-decoration: none; + + @media screen and (min-width: 2500px) { + font-size: 28px; + line-height: 33px; + } + } + } + } +} diff --git a/react-project/src/components/Header/assets/modules/SearchInput.module.scss b/react-project/src/components/Header/assets/modules/SearchInput.module.scss new file mode 100644 index 0000000..e5c3af6 --- /dev/null +++ b/react-project/src/components/Header/assets/modules/SearchInput.module.scss @@ -0,0 +1,56 @@ +.search { + form { + position: relative; + + input { + padding: 8px 44px 8px 16px; + background-color: var(--white); + border: 2px solid var(--gray-500); + border-radius: 5px; + color: var(--gray-600); + font-weight: 400; + font-size: 14px; + line-height: 16px; + width: 264px; + height: 32px; + + @media screen and (min-width: 2500px) { + width: 515.62px; + height: 57px; + padding: 12px 60px 12px 16px; + font-size: 28px; + line-height: 33px; + } + + @media screen and (max-width: 1024px) { + width: 100%; + } + + &::placeholder { + color: var(--gray-600); + } + } + + button { + position: absolute; + top: 6px; + right: 16px; + border: 0; + padding-top: 1px; + background-color: var(--white); + cursor: pointer; + + @media screen and (min-width: 2500px) { + top: 11px; + padding: 1px; + } + + img { + @media screen and (min-width: 2500px) { + width: 35.15px; + height: 35.15px; + } + } + } + } +} diff --git a/react-project/src/components/Header/assets/svgs/cart.svg b/react-project/src/components/Header/assets/svgs/cart.svg new file mode 100644 index 0000000..fd775ad --- /dev/null +++ b/react-project/src/components/Header/assets/svgs/cart.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/react-project/src/components/Header/assets/svgs/close.svg b/react-project/src/components/Header/assets/svgs/close.svg new file mode 100644 index 0000000..e0e6d36 --- /dev/null +++ b/react-project/src/components/Header/assets/svgs/close.svg @@ -0,0 +1,4 @@ + + + + diff --git a/react-project/src/components/Header/assets/svgs/hamburguer.svg b/react-project/src/components/Header/assets/svgs/hamburguer.svg new file mode 100644 index 0000000..6cadeb3 --- /dev/null +++ b/react-project/src/components/Header/assets/svgs/hamburguer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/react-project/src/components/Header/assets/svgs/logo.svg b/react-project/src/components/Header/assets/svgs/logo.svg new file mode 100644 index 0000000..7f767d8 --- /dev/null +++ b/react-project/src/components/Header/assets/svgs/logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/react-project/src/components/Header/assets/svgs/search.svg b/react-project/src/components/Header/assets/svgs/search.svg new file mode 100644 index 0000000..4374b77 --- /dev/null +++ b/react-project/src/components/Header/assets/svgs/search.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/react-project/src/components/Main.tsx b/react-project/src/components/Main.tsx deleted file mode 100644 index 0704091..0000000 --- a/react-project/src/components/Main.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { Routes, Route } from "react-router-dom"; - -import main from "../assets/styles/modules/Main.module.scss"; - -import { Navigation } from "./Navigation"; - -import { Sobre } from "./Sobre"; -import { Pagamento } from "./Pagamento"; -import { Entrega } from "./Entrega"; -import { Troca } from "./Troca"; -import { Seguranca } from "./Seguranca"; -import { Contato } from "./Contato"; - -//IMAGES -import iconHome from "../assets/images/svgs/home.svg"; -import iconArrow from "../assets/images/svgs/arrow-right.svg"; - -const Main = () => { - return ( -
-
- -
- Icone Home -
-
- -
- Icone Flecha para direita -
- INSTITUCIONAL -
- -

INSTITUCIONAL

- -
- - - - } /> - } /> - } /> - } /> - } /> - } /> - -
-
- ); -}; - -export { Main }; diff --git a/react-project/src/components/MainInstitucional/Breadcrumb.tsx b/react-project/src/components/MainInstitucional/Breadcrumb.tsx new file mode 100644 index 0000000..7ecd2c9 --- /dev/null +++ b/react-project/src/components/MainInstitucional/Breadcrumb.tsx @@ -0,0 +1,23 @@ +import breadcrumb from "./assets/modules/Breadcrumb.module.scss"; + +import iconHome from "./assets/svgs/home.svg"; +import iconArrow from "./assets/svgs/arrow-right.svg"; + +const Breadcrumb = () => { + return ( +
+ +
+ Icone Home +
+
+ +
+ Icone Flecha para direita +
+ INSTITUCIONAL +
+ ); +}; + +export { Breadcrumb }; diff --git a/react-project/src/components/Contato.tsx b/react-project/src/components/MainInstitucional/Contato.tsx similarity index 93% rename from react-project/src/components/Contato.tsx rename to react-project/src/components/MainInstitucional/Contato.tsx index b9ded7c..57ff157 100644 --- a/react-project/src/components/Contato.tsx +++ b/react-project/src/components/MainInstitucional/Contato.tsx @@ -1,9 +1,9 @@ import { Formik, Form, Field, ErrorMessage } from "formik"; -import FormSchema from "../schema/FormSchema"; +import FormSchema from "./assets/schemas/FormSchema"; import MaskedInput from "react-text-mask"; -import contato from "../assets/styles/modules/Contato.module.scss"; +import contato from "./assets/modules/Contato.module.scss"; interface IFormikValues { name: string; @@ -13,7 +13,6 @@ interface IFormikValues { telefone: string; instagram: string; terms: boolean; - /*sent: boolean;*/ } //setar valores iniciais @@ -68,16 +67,6 @@ const phoneNumberMask = [ const insta = ["@"]; const Contato = () => { - /*const handleFormikSubmit = (values: IFormikValues, actions) => {};*/ - - /*const teste = (values: IFormikValues) => { - if (values.sent) { - const h2Tag = document.querySelector("#enviado") as HTMLSpanElement; - h2Tag.innerHTML = "TESTE"; - alert("TESTANDO TESTE"); - } - };*/ - return (

Preencha o formulário

diff --git a/react-project/src/components/Entrega.tsx b/react-project/src/components/MainInstitucional/Entrega.tsx similarity index 94% rename from react-project/src/components/Entrega.tsx rename to react-project/src/components/MainInstitucional/Entrega.tsx index 781f37c..4d199c9 100644 --- a/react-project/src/components/Entrega.tsx +++ b/react-project/src/components/MainInstitucional/Entrega.tsx @@ -1,5 +1,4 @@ -import React from "react"; -import main from "../assets/styles/modules/Main.module.scss"; +import main from "./assets/modules/Main.module.scss"; const Entrega = () => { return ( diff --git a/react-project/src/components/MainInstitucional/Main.tsx b/react-project/src/components/MainInstitucional/Main.tsx new file mode 100644 index 0000000..c59ede7 --- /dev/null +++ b/react-project/src/components/MainInstitucional/Main.tsx @@ -0,0 +1,40 @@ +import { Routes, Route } from "react-router-dom"; + +import main from "./assets/modules/Main.module.scss"; + +import { Breadcrumb } from "./Breadcrumb"; +import { Navigation } from "./Navigation"; + +import { Sobre } from "./Sobre"; +import { Pagamento } from "./Pagamento"; +import { Entrega } from "./Entrega"; +import { Troca } from "./Troca"; +import { Seguranca } from "./Seguranca"; +import { Contato } from "./Contato"; + +const Main = () => { + return ( +
+ + +
+

INSTITUCIONAL

+ +
+ + + + } /> + } /> + } /> + } /> + } /> + } /> + +
+
+
+ ); +}; + +export { Main }; diff --git a/react-project/src/components/Navigation.tsx b/react-project/src/components/MainInstitucional/Navigation.tsx similarity index 80% rename from react-project/src/components/Navigation.tsx rename to react-project/src/components/MainInstitucional/Navigation.tsx index ad7294a..cf1422c 100644 --- a/react-project/src/components/Navigation.tsx +++ b/react-project/src/components/MainInstitucional/Navigation.tsx @@ -1,14 +1,13 @@ -import React from "react"; import { NavLink } from "react-router-dom"; -import navigation from "../assets/styles/modules/Navigation.module.scss"; +import navigation from "./assets/modules/Navigation.module.scss"; const Navigation = () => { /*let activeClassName = "ativo";*/ return (