UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

14 lines (13 loc) 507 B
/// <reference types="react" /> /** * Hook to listen the giving element resize events (using ResizeObserver) * and returning the updated height of that element according to those events * * Useful to animated using react-spring an element that we can't know the * actual size since it's computed from the child elements */ declare const useElementHeight: <ElementType extends HTMLElement>() => { ref: import("react").RefObject<ElementType>; height: number; }; export default useElementHeight;