Skip to content

Commit 6429dea

Browse files
committed
added Navbar
1 parent 6489183 commit 6429dea

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

src/components/NavBar/NavBar.jsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// @flow weak
2+
3+
import React from 'react';
4+
import PropTypes from 'prop-types';
5+
import { withStyles } from 'material-ui/styles';
6+
import AppBar from 'material-ui/AppBar';
7+
8+
import styles from './styles';
9+
10+
class NavBar extends React.PureComponent {
11+
static propTypes = {
12+
classes: PropTypes.shape({}),
13+
children: PropTypes.element,
14+
navbarPostion: PropTypes.string,
15+
};
16+
17+
render() {
18+
const { children, navbarPostion, classes, ...other } = this.props;
19+
return (
20+
<AppBar position={navbarPostion} color="default">
21+
{React.cloneElement(children, ...other)}
22+
</AppBar>
23+
);
24+
}
25+
}
26+
27+
export default withStyles(styles)(NavBar);

src/components/NavBar/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import NavBar from './NavBar';
2+
3+
export default NavBar;

src/components/NavBar/styles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default {};

0 commit comments

Comments
 (0)