Skip to content

Commit 1fef437

Browse files
committed
color should be default and should be settable by props
1 parent 21012b8 commit 1fef437

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/NavBar/NavBar.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ class NavBar extends React.PureComponent {
1212
classes: PropTypes.shape({}),
1313
children: PropTypes.element,
1414
navbarPostion: PropTypes.string,
15+
color: PropTypes.string,
1516
};
1617

1718
render() {
18-
const { children, navbarPostion, classes, ...other } = this.props;
19+
const { children, navbarPostion, classes, color, ...other } = this.props;
1920
return (
20-
<AppBar position={navbarPostion} color="default">
21+
<AppBar position={navbarPostion} color={color}>
2122
{React.cloneElement(children, { ...other })}
2223
</AppBar>
2324
);

0 commit comments

Comments
 (0)