1.0.0 • Published 3 years ago

@billogram/use-background-scrolling v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@billogram/use-background-scrolling

A React hook for disabling/enabling background scrolling when using overlays

Install

yarn add @billogram/use-background-scrolling

Usage

This hook assumes that the overlay-layout CSS class is available.

import useBackgroundScrolling from '@billogram/use-background-scrolling';

See types for exported types.

useBackgroundScrolling

const {
    disable,
    enable,
} = useBackgroundScrolling();

Note

This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. We probably won't take your feature requests unless they align with our own needs.

License

MIT