"use strict";

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

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

var _styledComponents = require("./styled-components.js");

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

/*
Copyright (c) 2018-2019 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
function Grid(_ref) {
  var align = _ref.align,
      behavior = _ref.behavior,
      children = _ref.children,
      gridColumns = _ref.gridColumns,
      gridGaps = _ref.gridGaps,
      gridGutters = _ref.gridGutters,
      gridMargins = _ref.gridMargins,
      gridMaxWidth = _ref.gridMaxWidth;
  return _react.default.createElement(_styledComponents.StyledGrid, {
    $behavior: behavior,
    $gridMargins: gridMargins,
    $gridGutters: gridGutters,
    $gridMaxWidth: gridMaxWidth,
    $align: align
  }, _react.default.Children.map(children, function (child) {
    return _react.default.createElement(_styledComponents.StyledCell, {
      $align: child.props.align,
      $order: child.props.order,
      $skip: child.props.skip,
      $span: child.props.span,
      $gridColumns: gridColumns,
      $gridGutters: gridGutters,
      $gridGaps: gridGaps
    }, child.props.children);
  }));
}