@atlaskit/drawer
Version:
A drawer is a panel that slides in from the left side of the screen.
10 lines (9 loc) • 407 B
TypeScript
/**
* Prevents programmatic scrolling of the viewport with `scrollIntoView`.
* Should be used in conjunction with a scroll lock to prevent a user from scrolling.
*
* ⚠️ This is copied from `packages/design-system/modal-dialog/src/internal/hooks/use-prevent-programmatic-scroll.tsx`
*
* @returns scroll top offset of the viewport
*/
export default function usePreventProgrammaticScroll(): number;