@material-ui/popper.js
Version:
A fork of popper.js to avoid the deprecation warnings: https://github.com/mui-org/material-ui/issues/19358.
16 lines (15 loc) • 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;
}