PromoCursed/node_modules/rc-tree/es/DropIndicator.js
2024-08-20 23:25:37 +04:00

30 lines
687 B
JavaScript

import * as React from 'react';
export default function DropIndicator(_ref) {
var dropPosition = _ref.dropPosition,
dropLevelOffset = _ref.dropLevelOffset,
indent = _ref.indent;
var style = {
pointerEvents: 'none',
position: 'absolute',
right: 0,
backgroundColor: 'red',
height: 2
};
switch (dropPosition) {
case -1:
style.top = 0;
style.left = -dropLevelOffset * indent;
break;
case 1:
style.bottom = 0;
style.left = -dropLevelOffset * indent;
break;
case 0:
style.bottom = 0;
style.left = indent;
break;
}
return /*#__PURE__*/React.createElement("div", {
style: style
});
}