webpackHotUpdate(4,{

/***/ "./module/index.js":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LayoutContext; });
/* unused harmony export emitter */
/* unused harmony export toggleLeft */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return showLeft; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return hideLeft; });
/* unused harmony export toggleRight */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return showRight; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hideRight; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__("./node_modules/react/cjs/react.development.js");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_tiny_emitter__ = __webpack_require__("./node_modules/tiny-emitter/index.js");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_tiny_emitter___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_tiny_emitter__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_is_callable__ = __webpack_require__("./node_modules/is-callable/index.js");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_is_callable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_is_callable__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__styles__ = __webpack_require__("./module/styles.js");
var _jsxFileName = '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js';

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

(function () {
  var enterModule = __webpack_require__("./node_modules/react-hot-loader/patch.js").enterModule;

  enterModule && enterModule(module);
})();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }







var defaultWidth = '300px';

// The minimal width in px for the pushed out content
var minimalWidthForPushedOutContent = 65;

var LayoutContext = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createContext();

var emitter = new __WEBPACK_IMPORTED_MODULE_1_tiny_emitter___default.a();
var showStatus = {
  left: false,
  right: false
};
var speed = 300;
var toggleResolvers = [];

function toggleSide(side, show) {
  if (toggleResolvers.length > 0) {
    toggleResolvers.forEach(function (r) {
      if (!r.handeled) {
        r.resolve(false);
        r.handeled = true;
      }
    });
  }

  return new Promise(function (resolve) {
    if (side === 'both') {
      showStatus.left = false;
      showStatus.right = false;
    } else {
      showStatus[side] = show;
    }

    emitter.emit('toggle', showStatus);

    if (show && document.activeElement) {
      document.activeElement.blur();
    }

    var resolver = {
      type: (show ? 'Show' : 'Hide') + ' ' + side + ' side(s)',
      timeout: setTimeout(function () {
        if (!resolver.handeled) {
          resolver.resolve(true);
        }
        toggleResolvers.splice(toggleResolvers.indexOf(function (r) {
          return r === resolver;
        }), 1);
      }, speed),
      resolve: resolve
    };

    toggleResolvers.push(resolver);
  });
}

var toggleLeft = function toggleLeft() {
  var show = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !showStatus.left;
  return toggleSide('left', show);
};
var showLeft = function showLeft() {
  return toggleLeft(true);
};
var hideLeft = function hideLeft() {
  return toggleLeft(false);
};
var toggleRight = function toggleRight() {
  var show = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !showStatus.right;
  return toggleSide('right', show);
};
var showRight = function showRight() {
  return toggleRight(true);
};
var hideRight = function hideRight() {
  return toggleRight(false);
};

var CrystallizeLayout = function (_Component) {
  _inherits(CrystallizeLayout, _Component);

  function CrystallizeLayout() {
    var _ref;

    var _temp, _this, _ret;

    _classCallCheck(this, CrystallizeLayout);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = CrystallizeLayout.__proto__ || Object.getPrototypeOf(CrystallizeLayout)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
      showLeft: showStatus.left,
      showRight: showStatus.right,
      widthOverride: null
    }, _this.activeWidthOverrides = {
      left: false,
      right: false,
      get any() {
        return this.left || this.right;
      }
    }, _this.animating = false, _this.startWidthOverride = function (side) {
      _this.activeWidthOverrides[side] = true;
    }, _this.handleWindowResize = function () {
      clearTimeout(_this.widthOverrideSetTimeout);
      _this.widthOverrideSetTimeout = setTimeout(function () {
        _this.setState({
          widthOverride: window.innerWidth - minimalWidthForPushedOutContent + 'px'
        });
      }, 25);

      // Set the current visible viewport to a custom variable
      var vh = window.innerHeight * 0.01;
      document.documentElement.style.setProperty('--vh', vh + 'px');
    }, _this.stopWidthOverride = function (side) {
      _this.activeWidthOverrides[side] = false;

      if (!_this.activeWidthOverrides.any) {
        clearTimeout(_this.widthOverrideSetTimeout);
      }
    }, _this.listenForMediaChange = function () {
      var _this$props = _this.props,
          _this$props$width = _this$props.width,
          width = _this$props$width === undefined ? defaultWidth : _this$props$width,
          leftWidth = _this$props.leftWidth,
          rightWidth = _this$props.rightWidth;


      var left = leftWidth || width;
      var right = rightWidth || width;

      _this.leftMql = window.matchMedia('(min-width: ' + (parseInt(left, 10) + minimalWidthForPushedOutContent) + 'px)');
      _this.leftMql.addListener(_this.handleLeftMediaChange);
      _this.handleLeftMediaChange(_this.leftMql);

      _this.rightMql = window.matchMedia('(min-width: ' + (parseInt(right, 10) + minimalWidthForPushedOutContent) + 'px)');
      _this.rightMql.addListener(_this.handleRightMediaChange);
      _this.handleRightMediaChange(_this.rightMql);
    }, _this.handleLeftMediaChange = function (mql) {
      var theScreenIsTooSmallForMenu = !mql.matches;
      if (theScreenIsTooSmallForMenu) {
        _this.startWidthOverride('left');
      } else {
        _this.stopWidthOverride('left');
      }
    }, _this.handleRightMediaChange = function (mql) {
      var theScreenIsTooSmallForMenu = !mql.matches;
      if (theScreenIsTooSmallForMenu) {
        _this.startWidthOverride('right');
      } else {
        _this.stopWidthOverride('right');
      }
    }, _this.stopListenForMediaChange = function () {
      _this.leftMql.removeListener(_this.handleLeftMediaChange);
      _this.rightMql.removeListener(_this.handleRightMediaChange);
      _this.stopWidthOverride('left');
      _this.stopWidthOverride('right');
    }, _this.onToggle = function (_ref2) {
      var left = _ref2.left,
          right = _ref2.right;

      if (_this.animating) {
        return Promise.resolve();
      }

      return new Promise(function (resolve) {
        _this.animating = true;

        var disableScroll = left || right;

        // Ensure we disable scroll before the animation kicks in
        if (disableScroll) {
          _this.disableScroll(true);
        }

        _this.setState({
          showLeft: left,
          showRight: right
        }, function () {
          setTimeout(function () {
            _this.animating = false;

            // Disable the scroll after the animation is done
            if (!disableScroll) {
              _this.disableScroll(false);
            }

            resolve();
          }, speed);
        });
      });
    }, _this.onOverlayClick = function (e) {
      e.preventDefault();
      toggleSide('both');
    }, _this.renderChildren = function (additionalProps) {
      var children = _this.props.children;

      // Render function

      if (__WEBPACK_IMPORTED_MODULE_2_is_callable___default()(children)) {
        return children(additionalProps);
      }

      return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) {
        return __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, additionalProps);
      });
    }, _this.contextActions = {
      toggleLeft: function toggleLeft() {
        return _this.onToggle({ left: true });
      },
      toggleRight: function toggleRight() {
        return _this.onToggle({ right: true });
      }
    }, _temp), _possibleConstructorReturn(_this, _ret);
  }

  _createClass(CrystallizeLayout, [{
    key: 'componentDidMount',
    value: function componentDidMount() {
      emitter.on('toggle', this.onToggle);
      speed = parseInt(this.props.speed || 300);
      this.listenForMediaChange();
      this.handleWindowResize();
      window.addEventListener('resize', this.handleWindowResize, false);
    }
  }, {
    key: 'componentWillUnmount',
    value: function componentWillUnmount() {
      emitter.off('toggle', this.onToggle);
      this.stopListenForMediaChange();

      window.removeEventListener('resize', this.handleWindowResize);
    }
  }, {
    key: 'disableScroll',
    value: function disableScroll(stop) {
      if (!this.defaultBodyOverflow) {
        var style = getComputedStyle(document.body);
        this.defaultBodyOverflow = style.overflow;
      }
      document.body.style.overflow = stop ? 'hidden' : this.defaultBodyOverflow;
    }
  }, {
    key: 'render',
    value: function render() {
      var _props = this.props,
          left = _props.left,
          right = _props.right,
          _props$width = _props.width,
          width = _props$width === undefined ? defaultWidth : _props$width,
          leftWidth = _props.leftWidth,
          rightWidth = _props.rightWidth,
          blurContentOnShow = _props.blurContentOnShow,
          _props$transitionProp = _props.transitionProp,
          transitionProp = _props$transitionProp === undefined ? 'left' : _props$transitionProp;
      var widthOverride = this.state.widthOverride;


      var leftWidthToUse = this.activeWidthOverrides.left ? widthOverride : leftWidth || width;
      var rightWidthToUse = this.activeWidthOverrides.right ? widthOverride : rightWidth || width;

      var _state = this.state,
          showLeft = _state.showLeft,
          showRight = _state.showRight;


      var contentPushed = '0px';
      if (showLeft) {
        contentPushed = leftWidthToUse;
      } else if (showRight) {
        contentPushed = '-' + rightWidthToUse;
      }

      var LeftCmp = left || null;
      var RightCmp = right || null;

      // Enable the blur content on show prop setting
      var blurContentOnShowProp = blurContentOnShow;
      if (blurContentOnShow && typeof blurContentOnShow === 'boolean') {
        blurContentOnShowProp = '3px';
      }

      var exposedState = {
        leftShown: showLeft,
        rightShown: showRight,
        contentPushed: contentPushed
      };

      return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
        LayoutContext.Provider,
        {
          value: {
            state: exposedState,
            actions: this.contextActions
          },
          __source: {
            fileName: _jsxFileName,
            lineNumber: 282
          }
        },
        __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
          __WEBPACK_IMPORTED_MODULE_3__styles__["d" /* Outer */],
          {
            showLeft: showLeft,
            showRight: showRight,
            leftWidth: leftWidthToUse,
            rightWidth: rightWidthToUse,
            speed: speed,
            transitionProp: transitionProp,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 288
            }
          },
          (showLeft || showRight) && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__styles__["a" /* ClickOverlay */], {
            showLeft: showLeft,
            showRight: showRight,
            leftWidth: leftWidthToUse,
            rightWidth: rightWidthToUse,
            onClick: this.onOverlayClick,
            transitionProp: transitionProp,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 297
            }
          }),
          __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
            __WEBPACK_IMPORTED_MODULE_3__styles__["b" /* Content */],
            {
              leftShown: showLeft,
              rightShown: showRight,
              blurContentOnShow: blurContentOnShowProp,
              speed: speed,
              transitionProp: transitionProp,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 306
              }
            },
            this.renderChildren(exposedState)
          ),
          LeftCmp && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
            __WEBPACK_IMPORTED_MODULE_3__styles__["c" /* Left */],
            {
              width: leftWidthToUse,
              show: showLeft,
              speed: speed,
              transitionProp: transitionProp,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 316
              }
            },
            __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LeftCmp, { shown: showLeft, __source: {
                fileName: _jsxFileName,
                lineNumber: 322
              }
            })
          ),
          RightCmp && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
            __WEBPACK_IMPORTED_MODULE_3__styles__["e" /* Right */],
            {
              width: rightWidthToUse,
              show: showRight,
              speed: speed,
              transitionProp: transitionProp,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 326
              }
            },
            __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(RightCmp, { shown: showRight, __source: {
                fileName: _jsxFileName,
                lineNumber: 332
              }
            })
          )
        )
      );
    }
  }, {
    key: '__reactstandin__regenerateByEval',
    value: function __reactstandin__regenerateByEval(key, code) {
      this[key] = eval(code);
    }
  }]);

  return CrystallizeLayout;
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);

var _default = CrystallizeLayout;
/* harmony default export */ __webpack_exports__["b"] = (_default);
;

(function () {
  var reactHotLoader = __webpack_require__("./node_modules/react-hot-loader/patch.js").default;

  var leaveModule = __webpack_require__("./node_modules/react-hot-loader/patch.js").leaveModule;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(defaultWidth, 'defaultWidth', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(minimalWidthForPushedOutContent, 'minimalWidthForPushedOutContent', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(LayoutContext, 'LayoutContext', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(emitter, 'emitter', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(showStatus, 'showStatus', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(speed, 'speed', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(toggleResolvers, 'toggleResolvers', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(toggleSide, 'toggleSide', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(toggleLeft, 'toggleLeft', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(showLeft, 'showLeft', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(hideLeft, 'hideLeft', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(toggleRight, 'toggleRight', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(showRight, 'showRight', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(hideRight, 'hideRight', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(CrystallizeLayout, 'CrystallizeLayout', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  reactHotLoader.register(_default, 'default', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/module/index.js');
  leaveModule(module);
})();

;
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__("./node_modules/next/node_modules/webpack/buildin/harmony-module.js")(module)))

/***/ }),

/***/ "./pages/index.js":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__("./node_modules/babel-runtime/regenerator/index.js");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_jsx_style__ = __webpack_require__("./node_modules/styled-jsx/style.js");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_jsx_style___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_styled_jsx_style__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__("./node_modules/react/cjs/react.development.js");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_next_head__ = __webpack_require__("./node_modules/next/head.js");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_next_head___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_next_head__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__module__ = __webpack_require__("./module/index.js");


var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _jsxFileName = '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/pages/index.js';


(function () {
  var enterModule = __webpack_require__("./node_modules/react-hot-loader/patch.js").enterModule;

  enterModule && enterModule(module);
})();

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }






var left = function left() {
  return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
    'aside',
    {
      __source: {
        fileName: _jsxFileName,
        lineNumber: 13
      }
    },
    __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
      'div',
      {
        __source: {
          fileName: _jsxFileName,
          lineNumber: 14
        }
      },
      'Left menu'
    ),
    __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
      'button',
      { onClick: __WEBPACK_IMPORTED_MODULE_4__module__["c" /* hideLeft */], __source: {
          fileName: _jsxFileName,
          lineNumber: 15
        }
      },
      'hide'
    )
  );
};
var right = function right() {
  return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
    'aside',
    {
      __source: {
        fileName: _jsxFileName,
        lineNumber: 19
      }
    },
    __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
      'div',
      {
        __source: {
          fileName: _jsxFileName,
          lineNumber: 20
        }
      },
      'Right menu'
    ),
    __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
      'button',
      { onClick: __WEBPACK_IMPORTED_MODULE_4__module__["d" /* hideRight */], __source: {
          fileName: _jsxFileName,
          lineNumber: 21
        }
      },
      'hide'
    )
  );
};

var Test = function (_React$Component) {
  _inherits(Test, _React$Component);

  function Test() {
    var _ref,
        _this2 = this;

    var _temp, _this, _ret;

    _classCallCheck(this, Test);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Test.__proto__ || Object.getPrototypeOf(Test)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
      transitionProp: 'left/right'
    }, _this.showLeft = _asyncToGenerator( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee() {
      var shown;
      return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              console.log('Showing left');
              _context.next = 3;
              return Object(__WEBPACK_IMPORTED_MODULE_4__module__["e" /* showLeft */])();

            case 3:
              shown = _context.sent;

              console.log('Shown?', shown);

            case 5:
            case 'end':
              return _context.stop();
          }
        }
      }, _callee, _this2);
    })), _this.onChange = function () {
      _this.setState(function (state) {
        return {
          transitionProp: state.transitionProp === 'left/right' ? 'transform' : 'left/right'
        };
      });
    }, _temp), _possibleConstructorReturn(_this, _ret);
  }

  _createClass(Test, [{
    key: 'render',
    value: function render() {
      var transitionProp = this.state.transitionProp;


      return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
        'div',
        {
          __source: {
            fileName: _jsxFileName,
            lineNumber: 47
          }
        },
        __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
          __WEBPACK_IMPORTED_MODULE_3_next_head___default.a,
          {
            __source: {
              fileName: _jsxFileName,
              lineNumber: 48
            }
          },
          __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('meta', { name: 'viewport', content: 'width=device-width, initial-scale=1', __source: {
              fileName: _jsxFileName,
              lineNumber: 49
            }
          })
        ),
        __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
          __WEBPACK_IMPORTED_MODULE_4__module__["b" /* default */],
          {
            left: left,
            right: right,
            speed: '500',
            transitionProp: transitionProp,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 51
            }
          },
          __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
            'div',
            {
              className: 'jsx-2673675625' + ' ' + 'bg',
              __source: {
                fileName: _jsxFileName,
                lineNumber: 57
              }
            },
            __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_styled_jsx_style___default.a, {
              styleId: '2420946349',
              css: 'body{margin:0;}.crystallize-layout__menu{background:#f0f0f0;}aside{padding:20px;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;box-sizing:border-box;}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,  */\n/*@ sourceURL=pages/index.js */'
            }),
            __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_styled_jsx_style___default.a, {
              styleId: '3443787597',
              css: '.bg.jsx-2673675625{background-size:cover;color:#444;}main.jsx-2673675625{text-align:center;height:100vh;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}h1.jsx-2673675625{margin:0 0 15px;padding-top:10px;}button.jsx-2673675625{margin:0 10px;}main.jsx-2673675625>div.jsx-2673675625{margin-bottom:15px;}label.jsx-2673675625{display:inline-block;padding:5px 10px;margin-left:10px;background:rgba(0,0,0,0.2);border-radius:15px;}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,  */\n/*@ sourceURL=pages/index.js */'
            }),
            __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
              'main',
              {
                className: 'jsx-2673675625',
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 112
                }
              },
              __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                'div',
                {
                  className: 'jsx-2673675625',
                  __source: {
                    fileName: _jsxFileName,
                    lineNumber: 113
                  }
                },
                __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                  'h1',
                  {
                    className: 'jsx-2673675625',
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 114
                    }
                  },
                  'React layout'
                ),
                __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                  'div',
                  {
                    className: 'jsx-2673675625',
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 115
                    }
                  },
                  'Transition on',
                  ' ',
                  __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                    'label',
                    {
                      className: 'jsx-2673675625',
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 117
                      }
                    },
                    'left/right',
                    ' ',
                    __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('input', {
                      type: 'radio',
                      checked: transitionProp === 'left/right',
                      onChange: this.onChange,
                      className: 'jsx-2673675625',
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 119
                      }
                    })
                  ),
                  __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                    'label',
                    {
                      className: 'jsx-2673675625',
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 125
                      }
                    },
                    'transform',
                    __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('input', {
                      type: 'radio',
                      checked: transitionProp === 'transform',
                      onChange: this.onChange,
                      className: 'jsx-2673675625',
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 127
                      }
                    })
                  )
                ),
                __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('br', {
                  className: 'jsx-2673675625',
                  __source: {
                    fileName: _jsxFileName,
                    lineNumber: 134
                  }
                }),
                __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                  'div',
                  {
                    className: 'jsx-2673675625',
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 135
                    }
                  },
                  __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                    'button',
                    { onClick: this.showLeft, className: 'jsx-2673675625',
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 136
                      }
                    },
                    'Show left'
                  ),
                  __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                    'button',
                    { onClick: __WEBPACK_IMPORTED_MODULE_4__module__["f" /* showRight */], className: 'jsx-2673675625',
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 137
                      }
                    },
                    'Show right'
                  )
                ),
                __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('br', {
                  className: 'jsx-2673675625',
                  __source: {
                    fileName: _jsxFileName,
                    lineNumber: 139
                  }
                }),
                __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('hr', {
                  className: 'jsx-2673675625',
                  __source: {
                    fileName: _jsxFileName,
                    lineNumber: 140
                  }
                }),
                __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                  'div',
                  {
                    className: 'jsx-2673675625',
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 141
                    }
                  },
                  __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                    __WEBPACK_IMPORTED_MODULE_4__module__["a" /* LayoutContext */].Consumer,
                    {
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 142
                      }
                    },
                    function (_ref3) {
                      var state = _ref3.state,
                          actions = _ref3.actions;
                      return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                        'div',
                        {
                          className: 'jsx-2673675625',
                          __source: {
                            fileName: _jsxFileName,
                            lineNumber: 144
                          }
                        },
                        __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                          'div',
                          {
                            className: 'jsx-2673675625',
                            __source: {
                              fileName: _jsxFileName,
                              lineNumber: 145
                            }
                          },
                          'Left shown? ',
                          state.leftShown ? 'yes' : 'no'
                        ),
                        __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                          'div',
                          {
                            className: 'jsx-2673675625',
                            __source: {
                              fileName: _jsxFileName,
                              lineNumber: 146
                            }
                          },
                          'Right shown? ',
                          state.rightShown ? 'yes' : 'no'
                        ),
                        __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
                          'div',
                          {
                            className: 'jsx-2673675625',
                            __source: {
                              fileName: _jsxFileName,
                              lineNumber: 149
                            }
                          },
                          'Content pushed: ',
                          state.contentPushed
                        )
                      );
                    }
                  )
                )
              )
            )
          )
        )
      );
    }
  }, {
    key: '__reactstandin__regenerateByEval',
    value: function __reactstandin__regenerateByEval(key, code) {
      this[key] = eval(code);
    }
  }]);

  return Test;
}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);

var _default = Test;
/* harmony default export */ __webpack_exports__["default"] = (_default);
;

(function () {
  var reactHotLoader = __webpack_require__("./node_modules/react-hot-loader/patch.js").default;

  var leaveModule = __webpack_require__("./node_modules/react-hot-loader/patch.js").leaveModule;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(left, 'left', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/pages/index.js');
  reactHotLoader.register(right, 'right', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/pages/index.js');
  reactHotLoader.register(Test, 'Test', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/pages/index.js');
  reactHotLoader.register(_default, 'default', '/Users/hakonmartinholmsenkrogh/Documents/www/react-layout/pages/index.js');
  leaveModule(module);
})();

;
    (function (Component, route) {
      if(!Component) return
      if (false) return
      module.hot.accept()
      Component.__route = route

      if (module.hot.status() === 'idle') return

      var components = next.router.components
      for (var r in components) {
        if (!components.hasOwnProperty(r)) continue

        if (components[r].Component.__route === route) {
          next.router.update(r, Component)
        }
      }
    })(typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__.default : (module.exports.default || module.exports), "/")
  
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__("./node_modules/next/node_modules/webpack/buildin/harmony-module.js")(module)))

/***/ })

})
//# sourceMappingURL=4.4cc6cf82c8452d34d487.hot-update.js.map