import { useEffect, useState } from 'react';
import { getRect } from './use-rect';
export var useHeight = function useHeight(element) {
  var _useState = useState(0),
      height = _useState[0],
      setHeight = _useState[1];

  useEffect(function () {
    if (element.current) {
      setHeight(getRect(element.current).height);
    }
  }, [element.current]);
  return height;
};
export default useHeight;