resize.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. const genResizeStyle = token => {
  7. const {
  8. componentCls
  9. } = token;
  10. return {
  11. [`${componentCls}-wrapper ${componentCls}-resize-handle`]: {
  12. position: 'absolute',
  13. top: 0,
  14. height: '100% !important',
  15. bottom: 0,
  16. left: ' auto !important',
  17. right: ' -8px',
  18. cursor: 'col-resize',
  19. touchAction: 'none',
  20. userSelect: 'auto',
  21. width: '16px',
  22. zIndex: 1,
  23. [`&-line`]: {
  24. display: 'block',
  25. width: '1px',
  26. marginLeft: '7px',
  27. height: '100% !important',
  28. backgroundColor: token.colorPrimary,
  29. opacity: 0
  30. },
  31. [`&:hover &-line`]: {
  32. opacity: 1
  33. }
  34. },
  35. [`${componentCls}-wrapper ${componentCls}-resize-handle.dragging`]: {
  36. overflow: 'hidden',
  37. [`${componentCls}-resize-handle-line`]: {
  38. opacity: 1
  39. },
  40. [`&:before`]: {
  41. position: 'absolute',
  42. top: 0,
  43. bottom: 0,
  44. content: '" "',
  45. width: '200vw',
  46. transform: 'translateX(-50%)',
  47. opacity: 0
  48. }
  49. }
  50. };
  51. };
  52. var _default = exports.default = genResizeStyle;