pouncejs
Version:
A collection of UI components from Panther labs
19 lines (14 loc) • 418 B
JavaScript
import { positionRight, positionMatchWidth, positionDefault } from '@reach/popover';
var useDropdownAlignment = function useDropdownAlignment(_ref) {
var alignment = _ref.alignment;
switch (alignment) {
case 'left':
return positionDefault;
case 'match-width':
return positionMatchWidth;
case 'right':
default:
return positionRight;
}
};
export default useDropdownAlignment;