volleyball-dev-frontend/node_modules/@headlessui/react/dist/hooks/use-on-disappear.d.ts
Marc Wieland 33181acf83
Some checks are pending
Deploy Volleyball CMS / deploy (push) Waiting to run
Last
2025-06-02 18:56:22 +02: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;