-
Notifications
You must be signed in to change notification settings - Fork 73
Minichallenge_1 #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Minichallenge_1 #25
Changes from 3 commits
ceb8845
c24e323
27596e7
c378502
814906b
85c6558
e1aa295
ef53302
453a8aa
22deacc
8a8cd20
9f20385
efdf712
4cb9885
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,61 +1,57 @@ | ||
| { | ||
| "name": "react-certification-2020", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "dependencies": { | ||
| "@testing-library/jest-dom": "^5.11.4", | ||
| "@testing-library/react": "^10.4.9", | ||
| "@testing-library/user-event": "^12.1.3", | ||
| "react": "^16.13.1", | ||
| "react-dom": "^16.13.1", | ||
| "react-router": "^5.2.0", | ||
| "react-router-dom": "^5.2.0", | ||
| "react-scripts": "3.4.3" | ||
| }, | ||
| "scripts": { | ||
| "start": "react-scripts start", | ||
| "build": "react-scripts build", | ||
| "test": "react-scripts test", | ||
| "eject": "react-scripts eject", | ||
| "lint": "eslint ./src --ext .js,.jsx", | ||
| "lint:fix": "eslint ./src --ext .js,.jsx --fix" | ||
| }, | ||
| "devDependencies": { | ||
| "eslint-config-airbnb": "^18.2.0", | ||
| "eslint-config-prettier": "^6.11.0", | ||
| "eslint-plugin-eslint-comments": "^3.2.0", | ||
| "eslint-plugin-import": "^2.22.0", | ||
| "eslint-plugin-jsx-a11y": "^6.3.1", | ||
| "eslint-plugin-prettier": "^3.1.4", | ||
| "eslint-plugin-react": "^7.20.6", | ||
| "eslint-plugin-react-hooks": "^4.1.0", | ||
| "husky": "^4.2.5", | ||
| "lint-staged": "^10.2.13", | ||
| "prettier": "^2.1.1", | ||
| "pretty-quick": "^3.0.0" | ||
| }, | ||
| "browserslist": { | ||
| "production": [ | ||
| ">0.2%", | ||
| "not dead", | ||
| "not op_mini all" | ||
| ], | ||
| "development": [ | ||
| "last 1 chrome version", | ||
| "last 1 firefox version", | ||
| "last 1 safari version" | ||
| ] | ||
| }, | ||
| "lint-staged": { | ||
| "*.{js, jsx, css, json}": [ | ||
| "yarn run lint:fix", | ||
| "pretty-quick --staged", | ||
| "git add" | ||
| ] | ||
| }, | ||
| "husky": { | ||
| "hooks": { | ||
| "pre-commit": "lint-staged" | ||
| "name": "react-certification-2020", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "dependencies": { | ||
| "@testing-library/jest-dom": "^5.11.4", | ||
| "@testing-library/react": "^10.4.9", | ||
| "@testing-library/user-event": "^12.1.3", | ||
| "react": "^16.13.1", | ||
| "react-dom": "^16.13.1", | ||
| "react-router": "^5.2.0", | ||
| "react-router-dom": "^5.2.0", | ||
| "react-scripts": "^4.0.3", | ||
| "styled-components": "^5.2.1" | ||
| }, | ||
| "scripts": { | ||
| "start": "react-scripts start", | ||
| "build": "react-scripts build", | ||
| "test": "react-scripts test", | ||
| "eject": "react-scripts eject", | ||
| "lint": "eslint ./src --ext .js,.jsx", | ||
| "lint:fix": "eslint ./src --ext .js,.jsx --fix" | ||
| }, | ||
| "devDependencies": { | ||
| "eslint-config-airbnb": "^18.2.0", | ||
| "eslint-config-prettier": "^6.11.0", | ||
| "eslint-plugin-eslint-comments": "^3.2.0", | ||
| "eslint-plugin-import": "^2.22.0", | ||
| "eslint-plugin-jsx-a11y": "^6.3.1", | ||
| "eslint-plugin-prettier": "^3.1.4", | ||
| "eslint-plugin-react": "^7.20.6", | ||
| "eslint-plugin-react-hooks": "^4.1.0", | ||
| "husky": "^4.2.5", | ||
| "lint-staged": "^10.2.13", | ||
| "prettier": "^2.1.1", | ||
| "pretty-quick": "^3.0.0" | ||
| }, | ||
| "browserslist": { | ||
| "production": [ | ||
| ">0.2%", | ||
| "not dead", | ||
| "not op_mini all" | ||
| ], | ||
| "development": [ | ||
| "last 1 chrome version", | ||
| "last 1 firefox version", | ||
| "last 1 safari version" | ||
| ] | ||
| }, | ||
| "lint-staged": { | ||
| "*.{js, jsx, css, json}": [ | ||
| "yarn run lint:fix", | ||
| "pretty-quick --staged", | ||
| "git add" | ||
| ] | ||
| } | ||
| } | ||
| } |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| import React from 'react'; | ||
| import styled from 'styled-components' | ||
|
|
||
| const StyledHeader = styled.header` | ||
| background-color: rgb(247, 247, 247); | ||
| display: flex; | ||
| border-bottom: 1px solid rgb(236, 236, 236 ) !important; | ||
| width: 100%; | ||
| flex-direction:column; | ||
| `; | ||
|
|
||
| const MenuContainer = styled.div` | ||
| display:flex; | ||
| width:auto; | ||
| position: relative; | ||
| align-items:center; | ||
| padding-left: 20px; | ||
| padding-right:20px; | ||
| min-height: 60px; | ||
| `; | ||
|
|
||
| const LeftMenu = styled.div` | ||
| display: flex; | ||
| `; | ||
|
|
||
| const CenterMenu=styled.div` | ||
| display: flex; | ||
| flex:1; | ||
| `; | ||
|
|
||
| const RightMenu = styled.div` | ||
| display: flex; | ||
| `; | ||
|
|
||
| const ToogleMenu =styled.div` | ||
| width: 35px; | ||
| height: 5px; | ||
| background-color: black; | ||
| margin: 6px 0; | ||
| `; | ||
|
|
||
| const SearchItem = styled.input` | ||
| width: 15em; | ||
| margin-left: 24px; | ||
| `; | ||
|
|
||
|
|
||
| const UserLogin = styled.button` | ||
| width: 40px important!; | ||
| height: 40px important!; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid using |
||
| align-items: center; | ||
| text-align: center; | ||
| border:none; | ||
| background: none; | ||
| `; | ||
|
|
||
| const Avatar = styled.div` | ||
| border-radius: 50%; | ||
| justify-content: center; | ||
| `; | ||
|
|
||
| const LabelSwitch = styled.label` | ||
| position: relative; | ||
| display: inline-block; | ||
| width: 60px; | ||
| height: 34px; | ||
| margin-right: 50px; | ||
| `; | ||
|
|
||
| function Header() { | ||
|
|
||
| return ( | ||
| <StyledHeader> | ||
| <MenuContainer> | ||
| <LeftMenu> | ||
| <div> | ||
| <ToogleMenu/> | ||
| <ToogleMenu/> | ||
| <ToogleMenu/> | ||
| </div> | ||
| <SearchItem/> | ||
| </LeftMenu> | ||
| <CenterMenu/> | ||
| <RightMenu> | ||
| <LabelSwitch> | ||
| <input id="none" type="checkbox" text="Dark Mode"/> | ||
| <span className="slider round"/> | ||
| </LabelSwitch> | ||
| <UserLogin> | ||
| <span> | ||
| <Avatar> | ||
| <svg> | ||
| <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/> | ||
| </svg> | ||
| </Avatar> | ||
| </span> | ||
| </UserLogin> | ||
| </RightMenu> | ||
| </MenuContainer> | ||
| </StyledHeader> | ||
| ); | ||
| } | ||
|
|
||
| export default Header; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export { default } | ||
| from './Header.component'; |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using
!important