@supunlakmal/hooks
Version:
A collection of reusable React hooks
15 lines (14 loc) • 413 B
TypeScript
interface UseScrollLockReturn {
isLocked: boolean;
lockScroll: () => void;
unlockScroll: () => void;
}
/**
* Hook to lock and unlock body scroll.
*
* Useful for modals, drawers, or overlays where background scrolling should be prevented.
*
* @returns {UseScrollLockReturn} Object with lock state and control functions.
*/
export declare function useScrollLock(): UseScrollLockReturn;
export {};