How to use webiny-load-assets - 1 common examples

To help you get started, we’ve selected a few webiny-load-assets 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 webiny / webiny-js / packages / webiny-app-cookie-policy / src / utils / showCookiePolicy.js View on Github external
const showCookiePolicy = async (params: Object) => {
    await load(
        "//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css",
        "//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"
    );

    window.cookieconsent.initialise(prepareParams(params));
};

webiny-load-assets

A small library for easy loading additional scripts and links (eg. stylesheets).

MIT
Latest version published 6 years ago

Package Health Score

66 / 100
Full package analysis

Popular webiny-load-assets functions

Similar packages