Socket
Book a DemoInstallSign in
Socket

deku-cookies

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deku-cookies

Cookie warning component for Deku

latest
Source
npmnpm
Version
1.5.0
Version published
Maintainers
2
Created
Source

deku-cookies

Simple cookie warning component for Deku

Accordning to the law in Europe the visitor of a website using cookies should get information about this and has to give their consent.

Install

$ npm install deku-cookies

Usage

import Cookies from 'deku-cookies';

const content = <div>We are using cookies, do you accept?</div>;

const render = () => (
	<Cookies button='Accept' content={content}/>;
);

export default {render};

Attributes

button

Type: element or string

Content to be shown as button. If a string is sent in, a button will be built automatically.

class

Type: string
Default: Cookies

Class to be added to the element.

content

Type: Element string

Content to be shown in the component.

content

Type: string
Default: 'deku-cookie-accepted'

Name of cookie to be set.

isAccepted

Type: Function

Function that runs on afterMount and returns a boolean.

maxage

Type: number
Default: 7889238000

Time before the cookie is removed. Default is around 3 months.

onClick

Type: Function

Function that runs on button click.

secure

Type: boolean
Default: false

Set a secure cookie.

License

MIT © Andreas Gillström

Keywords

component

FAQs

Package last updated on 29 Aug 2017

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