-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updating NavBar * Clean up * Adding styled-components and requested changes * Adding requested changes (Matt)
- Loading branch information
1 parent
883b865
commit ebd1430
Showing
7 changed files
with
178 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["next/babel"], | ||
"plugins": [["styled-components", { "ssr": true }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import styled from 'styled-components'; | ||
import { Row, Col, Spacer, Select } from '@geist-ui/react'; | ||
import { Sun, Moon } from '@geist-ui/react-icons'; | ||
|
||
const darkLogo = '/images/opticDarkLogo.png'; | ||
const lightLogo = '/images/opticLightLogo.png'; | ||
|
||
const NavBar = styled(Row)` | ||
align-items: center !important; | ||
height: 50px; | ||
border-bottom: 0.5px solid; | ||
margin-bottom: 15px; | ||
padding: 0px 15px; | ||
`; | ||
|
||
const Logo = styled.img` | ||
height: 40px; | ||
`; | ||
|
||
const SelectContainer = styled(Col)` | ||
text-align: right; | ||
`; | ||
|
||
interface NavParams { | ||
setUseLight(useLight: boolean): any; | ||
useLight: boolean; | ||
} | ||
|
||
const Nav = ({ useLight, setUseLight }: NavParams): JSX.Element => { | ||
return ( | ||
<NavBar> | ||
<Col> | ||
<Logo src={useLight ? darkLogo : lightLogo} alt="OpticPower" /> | ||
</Col> | ||
<SelectContainer> | ||
<Select placeholder={useLight ? 'Light Mode' : 'Dark Mode'}> | ||
<Select.Option value="Dark Mode" onClick={(): void => setUseLight(false)}> | ||
<Moon size={16} /> <Spacer inline x={0.35} /> | ||
Dark Mode | ||
</Select.Option> | ||
<Select.Option value="Light Mode" onClick={(): void => setUseLight(true)}> | ||
<Sun size={16} /> <Spacer inline x={0.35} /> | ||
Light Mode | ||
</Select.Option> | ||
</Select> | ||
</SelectContainer> | ||
</NavBar> | ||
); | ||
}; | ||
|
||
export default Nav; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ebd1430
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.
Successfully deployed to the following URLs: