Skip to content

Commit fc625f9

Browse files
committed
[APP]: Add toolbar and new avatar to header
1 parent 90f7b8d commit fc625f9

File tree

3 files changed

+21
-32
lines changed

3 files changed

+21
-32
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.header {
2+
height: 75px;
3+
border-bottom: 1px solid #000;
4+
5+
.row {
6+
height: 100%;
7+
}
8+
}

app/src/assets/scss/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
@import 'components/spinner';
55
@import 'components/avatar';
66
@import 'layouts/home';
7+
@import 'layouts/header';
78
@import 'layouts/toolbar';

app/src/components/Header/Header.js

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,21 @@
11
import React from 'react'
22
import cx from 'classnames'
3-
import AppBar from '@material-ui/core/AppBar'
4-
import Toolbar from '@material-ui/core/Toolbar'
5-
import Typography from '@material-ui/core/Typography'
6-
import IconButton from '@material-ui/core/IconButton'
7-
import MenuIcon from '@material-ui/icons/Menu'
8-
import { withStyles } from '@material-ui/core/styles'
93
import { Link } from 'react-router-dom'
104

11-
const styles = {
12-
appBar: {
13-
zIndex: 10000
14-
},
15-
headerTitle: {
16-
flex: 1
17-
},
18-
menuButton: {
19-
marginLeft: -12,
20-
marginRight: 20
21-
}
22-
}
23-
245
function Header ({ ...props }) {
25-
const { classes, Avatar } = props
6+
const { Avatar, ToolBar } = props
267
return (
27-
<AppBar position='absolute' className={classes.appBar}>
28-
<Toolbar>
29-
<IconButton className={classes.menuButton} color='inherit' aria-label='Menu'>
30-
<MenuIcon />
31-
</IconButton>
32-
<Typography variant='title' color='inherit' className={cx(classes.headerTitle, 'header-link')}>
33-
<Link to='/'>Blockchain Course</Link>
34-
</Typography>
35-
<Avatar />
36-
</Toolbar>
37-
</AppBar>
8+
<header className='header container-fluid'>
9+
<div className='row'>
10+
<div className='col-6'>
11+
<ToolBar />
12+
</div>
13+
<div className='col-6'>
14+
<Avatar />
15+
</div>
16+
</div>
17+
</header>
3818
)
3919
}
4020

41-
export default withStyles(styles)(Header)
21+
export default Header

0 commit comments

Comments
 (0)