Files
infocom-systems-design/node_modules/@headlessui/react/dist/hooks/use-on-disappear.d.ts
2025-10-03 22:27:28 +03:00

10 lines
443 B
TypeScript

import { type MutableRefObject } from 'react';
/**
* A hook to ensure that a callback is called when the element has disappeared
* from the screen.
*
* This can happen if you use Tailwind classes like: `hidden md:block`, once the
* viewport is smaller than `md` the element will disappear.
*/
export declare function useOnDisappear(enabled: boolean, ref: MutableRefObject<HTMLElement | null> | HTMLElement | null, cb: () => void): void;