react-elegant-ui
Version:
Elegant UI components, made by BEM best practices for react
15 lines (14 loc) • 557 B
TypeScript
/**
* Tool for correction a size of elements with `overflow: auto`
*
* This tool detect resize of element and call user handler with calculated X and Y indents
*
* WARNING: to avoid memory leaks you must call a clean function when element removed from DOM or when you want stop handling
* Return cleanup function that is stop a observing
*
* Original bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1424328
*/
export declare const overflowAutoFix: (wrapper: HTMLElement, callback: (obj: {
x: number;
y: number;
}) => void) => () => void;