import React from 'react';
import PropTypes from 'prop-types';
import AppBar from 'material-ui/AppBar';

import Theme from '../Theme';
import HeaderBrand from './HeaderBrand';

const Header = ({ left, title, right, style }) =>
  <div>
    <AppBar
      iconElementLeft={left}
      iconStyleLeft={styles.left}
      title={title}
      titleStyle={styles.title}
      iconElementRight={right}
      iconStyleRight={styles.right}
      showMenuIconButton={left !== null}
      style={{ ...styles.wrapper, ...style }}
      zDepth={2}
    />
  </div>;

Header.Brand = HeaderBrand;

const styles = {
  wrapper: {
    position: 'fixed',
    top: 0,
    zIndex: 1400,
    boxShadow: 'rgba(0, 0, 0, 0.004) 0px 5px 10px, rgba(0, 0, 0, 0.1) 0px 8px 20px',
  },
  left: {
    width: Theme.drawer.width,
    height: Theme.appBar.height,
    margin: 0,
    padding: 20,
    boxSizing: 'border-box',
    display: 'flex',
  },
  title: {
    height: Theme.appBar.height,
    margin: 0,
    padding: 20,
    boxSizing: 'border-box',
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    lineHeight: 'initial',
  },
  right: {
    width: Theme.drawer.width,
    height: Theme.appBar.height,
    margin: 0,
    padding: 20,
    boxSizing: 'border-box',
    display: 'flex',
    justifyContent: 'flex-end',
  },
};

Header.defaultProps = {
  style: {},
  left: null,
  title: null,
  right: null,
};

Header.propTypes = {
  style: PropTypes.object,
  left: PropTypes.node,
  title: PropTypes.node,
  right: PropTypes.node,
};

export default Header;

@@ -898,24 +898,50 @@
 ay: 'flex',%0A
+    alignItems: 'center',%0A
   %7D,%0A  title
@@ -1063,30 +1063,26 @@
 x',%0A    
-justifyContent
+alignItems
 : 'cente
@@ -1085,34 +1085,38 @@
 enter',%0A    
-alignItems
+justifyContent
 : 'center',%0A
@@ -1300,24 +1300,50 @@
 ay: 'flex',%0A
+    alignItems: 'center',%0A
     justifyC

Fix Header alignment