App.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';
  2. import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
  3. import _createClass from 'babel-runtime/helpers/createClass';
  4. import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
  5. import _inherits from 'babel-runtime/helpers/inherits';
  6. import React from 'react';
  7. import PropTypes from 'prop-types';
  8. import Dragger from './Dragger.js';
  9. import { int, innerHeight, innerWidth, outerHeight, outerWidth, parseBounds, isNumber } from './utils';
  10. var CtmpFather = function (_React$Component) {
  11. _inherits(CtmpFather, _React$Component);
  12. function CtmpFather() {
  13. _classCallCheck(this, CtmpFather);
  14. return _possibleConstructorReturn(this, (CtmpFather.__proto__ || _Object$getPrototypeOf(CtmpFather)).apply(this, arguments));
  15. }
  16. _createClass(CtmpFather, [{
  17. key: 'render',
  18. value: function render() {
  19. var _this2 = this;
  20. return React.createElement(
  21. 'div',
  22. {
  23. className: 'shitWrap',
  24. style: { display: 'flex', left: 100, height: 300, width: 300, border: '1px solid black', position: 'absolute' },
  25. ref: function ref(node) {
  26. return _this2.node = node;
  27. }
  28. },
  29. React.createElement(
  30. Dragger,
  31. {
  32. bounds: 'parent',
  33. style: { height: 50, width: 50, padding: 10, margin: 10, border: '1px solid black' },
  34. grid: [30, 30]
  35. },
  36. React.createElement(
  37. 'div',
  38. null,
  39. React.createElement(
  40. 'p',
  41. null,
  42. 'asdasdad'
  43. ),
  44. React.createElement(
  45. 'p',
  46. null,
  47. 'asdasdad'
  48. )
  49. )
  50. ),
  51. React.createElement(
  52. Dragger,
  53. {
  54. style: { height: 50, width: 50, padding: 10, margin: 10, border: '1px solid black' },
  55. hasDraggerHandle: true
  56. },
  57. React.createElement(
  58. 'div',
  59. null,
  60. React.createElement(
  61. 'p',
  62. { className: 'handle' },
  63. 'asdasdad'
  64. )
  65. )
  66. )
  67. );
  68. }
  69. }]);
  70. return CtmpFather;
  71. }(React.Component);
  72. var _default = CtmpFather;
  73. export default _default;
  74. ;
  75. var _temp = function () {
  76. if (typeof __REACT_HOT_LOADER__ === 'undefined') {
  77. return;
  78. }
  79. __REACT_HOT_LOADER__.register(CtmpFather, 'CtmpFather', 'app/src/App.js');
  80. __REACT_HOT_LOADER__.register(_default, 'default', 'app/src/App.js');
  81. }();
  82. ;