How to use the @magento/peregrine.useScrollLock function in @magento/peregrine

To help you get started, we’ve selected a few @magento/peregrine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Jordaneisenburger / fallback-studio / src / example-company / example-shop / src / lib / components / Main / main.js View on Github external
const Main = props => {
    const { children, isMasked } = props;
    const classes = mergeClasses(defaultClasses, props.classes);

    const rootClass = isMasked ? classes.root_masked : classes.root;
    const pageClass = isMasked ? classes.page_masked : classes.page;

    useScrollLock(isMasked);

    return (
        <main>
            
            <header>
            <div>{children}</div>
            <footer>
        </footer></header></main>
    );
};
github Jordaneisenburger / fallback-studio / src / pwa-studio / packages / venia-concept / src / components / Main / main.js View on Github external
const Main = props =&gt; {
    const { children, hasBeenOffline, isMasked, isOnline } = props;
    const classes = mergeClasses(defaultClasses, props.classes);

    const rootClass = isMasked ? classes.root_masked : classes.root;
    const pageClass = isMasked ? classes.page_masked : classes.page;

    useScrollLock(isMasked);

    return (
        <main>
            <header>
            <div>{children}</div>
            <footer>
        </footer></header></main>
    );
};