diff --git a/desafio-react-app/.gitignore b/.gitignore similarity index 100% rename from desafio-react-app/.gitignore rename to .gitignore diff --git a/README.md b/README.md index 96b9d3b..b87cb00 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,46 @@ -# Desafio REACT e Typescript +# Getting Started with Create React App +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +## Available Scripts -## Getting started +In the project directory, you can run: -To make it easy for you to get started with GitLab, here's a list of recommended next steps. +### `npm start` -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)! +Runs the app in the development mode.\ +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. -## Add your files +The page will reload if you make edits.\ +You will also see any lint errors in the console. -- [ ] [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: +### `npm test` -``` -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 -``` +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. -## Integrate with your tools +### `npm run build` -- [ ] [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) +Builds the app for production to the `build` folder.\ +It correctly bundles React in production mode and optimizes the build for the best performance. -## Collaborate with your team +The build is minified and the filenames include the hashes.\ +Your app is ready to be deployed! -- [ ] [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) +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. -## Test and Deploy +### `npm run eject` -Use the built-in continuous integration in GitLab. +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** -- [ ] [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) +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. -# Editing this README +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. -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. +## Learn More -## 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. +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/). diff --git a/desafio-react-app/README.md b/desafio-react-app/README.md deleted file mode 100644 index b87cb00..0000000 --- a/desafio-react-app/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# 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/). diff --git a/desafio-react-app/package-lock.json b/package-lock.json similarity index 100% rename from desafio-react-app/package-lock.json rename to package-lock.json diff --git a/desafio-react-app/package.json b/package.json similarity index 100% rename from desafio-react-app/package.json rename to package.json diff --git a/desafio-react-app/public/index.html b/public/index.html similarity index 100% rename from desafio-react-app/public/index.html rename to public/index.html diff --git a/desafio-react-app/src/assets/svgs/buying-cart.svg b/src/assets/svgs/buying-cart.svg similarity index 100% rename from desafio-react-app/src/assets/svgs/buying-cart.svg rename to src/assets/svgs/buying-cart.svg diff --git a/desafio-react-app/src/assets/svgs/lupa.svg b/src/assets/svgs/lupa.svg similarity index 100% rename from desafio-react-app/src/assets/svgs/lupa.svg rename to src/assets/svgs/lupa.svg diff --git a/desafio-react-app/src/assets/svgs/m3-logo.svg b/src/assets/svgs/m3-logo.svg similarity index 100% rename from desafio-react-app/src/assets/svgs/m3-logo.svg rename to src/assets/svgs/m3-logo.svg diff --git a/desafio-react-app/src/assets/svgs/menu-hamburguer.svg b/src/assets/svgs/menu-hamburguer.svg similarity index 100% rename from desafio-react-app/src/assets/svgs/menu-hamburguer.svg rename to src/assets/svgs/menu-hamburguer.svg diff --git a/src/components/HeaderBottom.tsx b/src/components/HeaderBottom.tsx new file mode 100644 index 0000000..ec75f48 --- /dev/null +++ b/src/components/HeaderBottom.tsx @@ -0,0 +1,23 @@ +import React from "react"; + +import style from "./header-bottom.module.scss"; + +const HeaderBottom = () => { + return ( +
+ +
+ ); +}; + +export { HeaderBottom }; diff --git a/desafio-react-app/src/components/HeaderTop.tsx b/src/components/HeaderTop.tsx similarity index 100% rename from desafio-react-app/src/components/HeaderTop.tsx rename to src/components/HeaderTop.tsx diff --git a/src/components/header-bottom.module.scss b/src/components/header-bottom.module.scss new file mode 100644 index 0000000..46b1e33 --- /dev/null +++ b/src/components/header-bottom.module.scss @@ -0,0 +1,35 @@ +@use "../variables.module.scss"; + +.header-bottom-container { + width: 100%; + background: variables.$color-black; + + .header-bottom-wrapper { + width: 80.46875%; + display: flex; + align-items: center; + padding: 14px 0; + margin: 0 auto; + + button { + border: 0; + background: transparent; + margin-right: 55px; + cursor: pointer; + } + + .header-button { + font-weight: 400; + font-size: 14px; + line-height: 16px; + text-transform: uppercase; + color: variables.$color-white; + + @media screen and (min-width: 2500px) { + font-weight: 500; + font-size: 28px; + line-height: 33px; + } + } + } +} diff --git a/desafio-react-app/src/components/header-top.module.scss b/src/components/header-top.module.scss similarity index 100% rename from desafio-react-app/src/components/header-top.module.scss rename to src/components/header-top.module.scss diff --git a/desafio-react-app/src/globals.module.scss b/src/globals.module.scss similarity index 100% rename from desafio-react-app/src/globals.module.scss rename to src/globals.module.scss diff --git a/desafio-react-app/src/index.tsx b/src/index.tsx similarity index 100% rename from desafio-react-app/src/index.tsx rename to src/index.tsx diff --git a/desafio-react-app/src/pages/Home.tsx b/src/pages/Home.tsx similarity index 70% rename from desafio-react-app/src/pages/Home.tsx rename to src/pages/Home.tsx index 7b71407..87032f0 100644 --- a/desafio-react-app/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,11 +1,13 @@ import React from "react"; import { HeaderTop } from "../components/HeaderTop"; +import { HeaderBottom } from "../components/HeaderBottom"; function Home() { return (
+
); } diff --git a/desafio-react-app/src/react-app-env.d.ts b/src/react-app-env.d.ts similarity index 100% rename from desafio-react-app/src/react-app-env.d.ts rename to src/react-app-env.d.ts diff --git a/desafio-react-app/src/variables.module.scss b/src/variables.module.scss similarity index 100% rename from desafio-react-app/src/variables.module.scss rename to src/variables.module.scss diff --git a/desafio-react-app/tsconfig.json b/tsconfig.json similarity index 100% rename from desafio-react-app/tsconfig.json rename to tsconfig.json