UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

14 lines (13 loc) 577 B
"use client"; //#region packages/@mantine/core/src/utils/Floating/get-floating-position/get-floating-position.ts 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; } //#endregion exports.getFloatingPosition = getFloatingPosition; //# sourceMappingURL=get-floating-position.cjs.map