Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fremtind/jkl-cookie-consent-react

Package Overview
Dependencies
Maintainers
3
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fremtind/jkl-cookie-consent-react

Jøkul react cookie consent component

  • 4.0.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
472
increased by191.36%
Maintainers
3
Weekly downloads
 
Created
Source

Beskrivelse

Se portalen for bruk og prinsipper.

Kom i gang

Lær hvordan du kan ta i bruk Jøkul

Bruk av React-pakken

Installasjon

  1. Installér pakken med yarn add @fremtind/jkl-cookie-consent-react eller npm i @fremtind/jkl-cookie-consent-react. Stil-pakken blir automatisk installert som en avhengighet.

  2. Importer både React-pakken (velg komponenten(e) du trenger) og stil-pakken i prosjektet ditt:

import { CookieConsentProvider, CookieConsent, useCookieConsent } from "@fremtind/jkl-cookie-consent-react";
import "@fremtind/jkl-cookie-consent/cookie-consent.min.css";
import "@fremtind/jkl-button/button.min.css";
import "@fremtind/jkl-list/list.min.css";

Bruk

Komponentene tar følgende props:

CookieConsentProvider:

  • marketing: Krav om cookies for markedsføring
  • functional: Krav om funksjonelle cookies
  • statistics: Krav om cookies for statistikk
  • cookieAdapter: En funksjon som gjør oppslag mot cookies, for å lete etter andre cookies som kan bestemme et consent

CookieConsent:

  • blocking: Betegner en blokkerende modal, som krever en aktiv handling
  • onAccept: Callback når et consent er håndtert. Første argument er consentet.

Enkel bruk kan se slik ut:

<CookieConsentProvider functional marketing statistics>
    <Content />
    <CookieConsent blocking />
</CookieConsentProvider>

Keywords

FAQs

Package last updated on 07 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc