Files
WorkManager/node_modules/popper.js/src/utils/getOppositeVariation.js
2024-12-13 08:53:01 +01:00

16 lines
382 B
JavaScript

/**
* Get the opposite placement variation of the given one
* @method
* @memberof Popper.Utils
* @argument {String} placement variation
* @returns {String} flipped placement variation
*/
export default function getOppositeVariation(variation) {
if (variation === 'end') {
return 'start';
} else if (variation === 'start') {
return 'end';
}
return variation;
}