export const getViewport = () => ({
  height: window.innerHeight || document.documentElement.offsetHeight,
  width: window.innerWidth || document.documentElement.offsetWidth,
});

export const isElementOverflowing = element =>
  element.clientWidth < element.scrollWidth || element.clientHeight < element.scrollHeight;

@@ -206,16 +206,17 @@
 rflowing
+X
  = eleme
@@ -264,19 +264,68 @@
 ollWidth
- %7C%7C
+;%0A%0Aexport const isElementOverflowingY = element =%3E%0A 
  element

Split up util function to detect horizontal & vertical overflowing separately