@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
19 lines (18 loc) • 631 B
TypeScript
import React from 'react';
interface Params {
ref?: React.MutableRefObject<HTMLElement | null>;
}
interface ReturnValue {
measures?: DOMRect;
}
/**
* Custom hook that returns the bounding client rect of a specified element.
*
* @param {Params} props - The hook parameters.
* @param {React.MutableRefObject<HTMLElement | null>} props.ref - The reference to the element.
*
* @returns {ReturnValue} - The hook return value.
* @returns {DOMRect | undefined} ReturnValue.measures - The bounding client rect of the element.
*/
export declare const useElementBoundingClientRect: (props: Params) => ReturnValue;
export {};