"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.PortraitGrid = void 0;

var _react = _interopRequireDefault(require("react"));

var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));

var _reactUse = require("react-use");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const PortraitGrid = props => {
  const state = (0, _reactUse.useWindowSize)();
  if (state.width >= state.height) return null;
  const {
    children,
    ...rest
  } = props; // eslint-disable-line

  return /*#__PURE__*/_react.default.createElement(_Grid.default, rest, children);
};

exports.PortraitGrid = PortraitGrid;
var _default = PortraitGrid;
exports.default = _default;