Header.js 929 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * React Static Boilerplate
  3. * https://github.com/koistya/react-static-boilerplate
  4. *
  5. * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE.txt file in the root directory of this source tree.
  9. */
  10. import React from 'react';
  11. import Navigation from './Navigation';
  12. class Header extends React.Component {
  13. componentDidMount() {
  14. window.componentHandler.upgradeElement(this.refs.root);
  15. }
  16. componentWillUnmount() {
  17. window.componentHandler.downgradeElements(this.refs.root);
  18. }
  19. render() {
  20. return (
  21. <header className="mdl-layout__header" ref="root">
  22. <div className="mdl-layout__header-row">
  23. <span className="mdl-layout-title">React Static Boilerplate</span>
  24. <div className="mdl-layout-spacer"></div>
  25. <Navigation />
  26. </div>
  27. </header>
  28. );
  29. }
  30. }
  31. export default Header;