daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // withNavBar.js - HOC
  2. import React from "react";
  3. import NavBar from "../components/navBar";
  4.  
  5. const styles = {
  6.   root: {
  7.     flexGrow: 1
  8.   }
  9. };
  10.  
  11. export default Page => {
  12.   return class PageWithHeader extends React.Component {
  13.     render() {
  14.       return (
  15.         <div style={styles.root}>
  16.           <NavBar />
  17.           <Page {...this.props} />
  18.         </div>
  19.       );
  20.     }
  21.   };
  22. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top