UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

12 lines (10 loc) 441 B
function getFloatingPosition(dir, position) { if (dir === "rtl" && (position.includes("right") || position.includes("left"))) { const [side, placement] = position.split("-"); const flippedPosition = side === "right" ? "left" : "right"; return placement === void 0 ? flippedPosition : `${flippedPosition}-${placement}`; } return position; } export { getFloatingPosition }; //# sourceMappingURL=get-floating-position.js.map