cookie-consent
Overview
The npm package for cookie consent helpers. These functions are tighly coupled to using the cookiebot api at the moment.
Usage
Installation
npm install @envato/cookie-consent --save
yarn add @envato/cookie-consent
Examples
import { Consent, consented, deferRun } from '@envato/cookie-consent'
if (consented(Consent.statistics)) {
}
checkCookieConsent(Cookies.get('CookieConsent'), Consent.statistics)
deferRun(() => {
doSomething()
}, Consent.marketing)
Consent.marketing
Consent.statistics
Consent.preferences
Consent.necessary
Override CSS
There is a cookiebot.css
in the module, you can include it to partially override the default Cookiebot style.
To publish
Run
npm version (patch/minor/major)
npm publish