Skip to content

Commit 0507bbd

Browse files
authored
Merge pull request #16 from oslabs-beta/victor/sidebar
UI: change nav to black
2 parents f2ac536 + b3d3416 commit 0507bbd

File tree

1 file changed

+33
-17
lines changed

1 file changed

+33
-17
lines changed

app/src/components/top/NavBar.tsx

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
import React, { useState } from 'react';
2+
23
import Avatar from '@mui/material/Avatar';
4+
import Button from '@mui/material/Button';
5+
import MoreVertIcon from '@mui/icons-material/MoreVert';
6+
import NavBarButtons from './NavBarButtons';
37
import NavbarDropDown from './NavBarButtons';
8+
import NewExportButton from './NewExportButton';
49
import { RootState } from '../../redux/store';
510
import logo from '../../public/icons/win/logo.png';
6-
import NewExportButton from './NewExportButton';
711
import { useSelector } from 'react-redux';
8-
import Button from '@mui/material/Button';
9-
import MoreVertIcon from '@mui/icons-material/MoreVert';
10-
import NavBarButtons from './NavBarButtons';
1112

1213
const NavBar = () => {
1314
const [dropMenu, setDropMenu] = useState(false);
14-
const isDarkMode = useSelector((state: RootState) => state.darkMode.isDarkMode);
15+
const isDarkMode = useSelector(
16+
(state: RootState) => state.darkMode.isDarkMode
17+
);
1518

1619
const buttonContainerStyle = {
1720
display: 'flex',
1821
alignItems: 'center',
19-
justifyContent: 'flex-start',
22+
justifyContent: 'flex-start'
2023
};
2124

2225
const buttonStyle = {
@@ -27,30 +30,39 @@ const NavBar = () => {
2730
padding: '8px 12px',
2831
cursor: 'pointer',
2932
marginRight: '10px',
30-
marginLeft: '5px',
31-
borderRadius: '4px',
33+
marginLeft: '5px',
34+
borderRadius: '4px'
3235
};
3336

3437
const moreVertButtonStyle = {
3538
backgroundColor: '#333',
3639
border: '1px solid #333',
3740
padding: '0',
3841
cursor: 'pointer',
39-
display: 'flex',
40-
alignItems: 'center',
41-
justifyContent: 'flex-start',
42+
display: 'flex',
43+
alignItems: 'center',
44+
justifyContent: 'flex-start',
4245
borderRadius: '4px',
43-
width: '30px',
46+
width: '30px',
4447
minWidth: '20px',
45-
marginLeft: '0px',
46-
marginRight: '10px',
48+
marginLeft: '0px',
49+
marginRight: '10px'
4750
};
4851

4952
return (
50-
<nav className="main-navbar" style={isDarkMode ? { backgroundColor: '#013365' } : { backgroundColor: 'white' }}>
53+
<nav
54+
className="main-navbar"
55+
style={
56+
isDarkMode
57+
? { backgroundColor: '#013365' }
58+
: { backgroundColor: '#151515' }
59+
}
60+
>
5161
<div className="main-logo">
5262
<Avatar src={logo}></Avatar>
53-
<h1 style={isDarkMode ? { color: 'white' } : { color: '#013365' }}>ReacType</h1>
63+
<h1 style={isDarkMode ? { color: 'white' } : { color: 'white' }}>
64+
ReacType
65+
</h1>
5466
</div>
5567
<div style={buttonContainerStyle}>
5668
<button style={buttonStyle}>Share</button>
@@ -63,7 +75,11 @@ const NavBar = () => {
6375
>
6476
<MoreVertIcon style={{ color: 'white' }} />
6577
</Button>
66-
<NavBarButtons dropMenu={dropMenu} setDropMenu={setDropMenu} style={{ color: 'white' }} />
78+
<NavBarButtons
79+
dropMenu={dropMenu}
80+
setDropMenu={setDropMenu}
81+
style={{ color: 'white' }}
82+
/>
6783
</div>
6884
</nav>
6985
);

0 commit comments

Comments
 (0)