@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
17 lines (16 loc) • 705 B
TypeScript
import React from 'react';
type UseTooltipContentScrollParamsType = {
tooltipRef: React.RefObject<HTMLDivElement>;
};
type UseTooltipContentScrollReturnType = {
contentRefHandler: (innerContentElement: HTMLDivElement | null) => void;
contentHasScroll: boolean;
};
/**
* Custom hook that determines if the tooltip content has scroll and provides a ref to the content element.
*
* @param tooltipRef - Ref to the tooltip element.
* @returns An object containing the `contentHasScroll` boolean and the `contentRefHandler` callback function.
*/
export declare const useTooltipContentScroll: ({ tooltipRef, }: UseTooltipContentScrollParamsType) => UseTooltipContentScrollReturnType;
export {};