You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vertical-grid-lines.js 2.4 KiB

3 年之前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
  6. //
  7. // Permission is hereby granted, free of charge, to any person obtaining a copy
  8. // of this software and associated documentation files (the "Software"), to deal
  9. // in the Software without restriction, including without limitation the rights
  10. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. // copies of the Software, and to permit persons to whom the Software is
  12. // furnished to do so, subject to the following conditions:
  13. //
  14. // The above copyright notice and this permission notice shall be included in
  15. // all copies or substantial portions of the Software.
  16. //
  17. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  23. // THE SOFTWARE.
  24. var _react = require('react');
  25. var _react2 = _interopRequireDefault(_react);
  26. var _propTypes = require('prop-types');
  27. var _propTypes2 = _interopRequireDefault(_propTypes);
  28. var _gridLines = require('./grid-lines');
  29. var _gridLines2 = _interopRequireDefault(_gridLines);
  30. var _axisUtils = require('../utils/axis-utils');
  31. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  32. var VERTICAL = _axisUtils.DIRECTION.VERTICAL;
  33. var propTypes = _extends({}, _gridLines2.default.propTypes, {
  34. direction: _propTypes2.default.oneOf([VERTICAL])
  35. });
  36. var defaultProps = {
  37. direction: VERTICAL,
  38. attr: 'x'
  39. };
  40. function VerticalGridLines(props) {
  41. return _react2.default.createElement(_gridLines2.default, props);
  42. }
  43. VerticalGridLines.displayName = 'VerticalGridLines';
  44. VerticalGridLines.propTypes = propTypes;
  45. VerticalGridLines.defaultProps = defaultProps;
  46. VerticalGridLines.requiresSVG = true;
  47. exports.default = VerticalGridLines;