'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _shape = require('@vx/shape');

var _group = require('@vx/group');

var _gradient = require('@vx/gradient');

var _scale = require('@vx/scale');

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

var _jsxFileName = '/Users/hshoff/code/vx/packages/vx-demo/components/tiles/polygons.js';


var polygons = [{
  sides: 3,
  fill: 'rgb(174, 238, 248)',
  rotate: 90
}, {
  sides: 4,
  fill: 'rgb(229, 253, 61)',
  rotate: 45
}, {
  sides: 6,
  fill: 'rgb(229, 130, 255)',
  rotate: 0
}, {
  sides: 8,
  fill: 'url(#polygon-pink)',
  rotate: 0
}];

exports.default = function (_ref) {
  var width = _ref.width,
      height = _ref.height;

  var yScale = (0, _scale.scaleBand)({
    rangeRound: [0, height],
    domain: polygons.map(function (p, i) {
      return i;
    }),
    padding: 0.5
  });
  return _react2.default.createElement('svg', { width: width, height: height, __source: {
      fileName: _jsxFileName,
      lineNumber: 37
    }
  }, _react2.default.createElement('rect', { x: 0, y: 0, width: width, height: height, fill: '#7f82e3', rx: 14, __source: {
      fileName: _jsxFileName,
      lineNumber: 38
    }
  }), _react2.default.createElement(_gradient.GradientPinkRed, { id: 'polygon-pink', __source: {
      fileName: _jsxFileName,
      lineNumber: 39
    }
  }), polygons.map(function (polygon, i) {
    return _react2.default.createElement(_group.Group, { key: 'polygon-' + i, top: yScale(i), left: width / 2, __source: {
        fileName: _jsxFileName,
        lineNumber: 41
      }
    }, _react2.default.createElement(_shape.Polygon, { sides: polygon.sides, size: 25, fill: polygon.fill, rotate: polygon.rotate, __source: {
        fileName: _jsxFileName,
        lineNumber: 42
      }
    }));
  }));
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvdGlsZXMvcG9seWdvbnMuanMiXSwibmFtZXMiOlsiUmVhY3QiLCJQb2x5Z29uIi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