Dragger.js 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. "use client";
  2. var __rest = this && this.__rest || function (s, e) {
  3. var t = {};
  4. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  5. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  6. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  7. }
  8. return t;
  9. };
  10. import * as React from 'react';
  11. import Upload from './Upload';
  12. const Dragger = /*#__PURE__*/React.forwardRef((_a, ref) => {
  13. var {
  14. style,
  15. height,
  16. hasControlInside = false
  17. } = _a,
  18. restProps = __rest(_a, ["style", "height", "hasControlInside"]);
  19. return /*#__PURE__*/React.createElement(Upload, Object.assign({
  20. ref: ref,
  21. hasControlInside: hasControlInside
  22. }, restProps, {
  23. type: "drag",
  24. style: Object.assign(Object.assign({}, style), {
  25. height
  26. })
  27. }));
  28. });
  29. if (process.env.NODE_ENV !== 'production') {
  30. Dragger.displayName = 'Dragger';
  31. }
  32. export default Dragger;