Socket
Socket
Sign inDemoInstall

@cuban-engineer/react-cookies-consent

Package Overview
Dependencies
9
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cuban-engineer/react-cookies-consent

React component for the managing the user awareness regarding cookies usage


Version published
Weekly downloads
1
decreased by-50%
Maintainers
4
Install size
89.2 kB
Created
Weekly downloads
 

Readme

Source

code style: prettier code linting: eslint code quality: jest MIT license

React component for the managing the user awareness regarding cookies usage

Install

npm install --save @cuban-engineer/react-cookies-consent

or

yarn add @cuban-engineer/react-cookies-consent

Usage

import React, { Component } from 'react'

import CookiesConsent from '@cuban-engineer/react-cookies-consent'

class Example extends Component {
  render () {
    return (
      <CookiesConsent />
    )
  }
}

Available props

  • cookiesId Value with which the cookie will be save in the browser: (Type: String, Default value: 'cookies-consent')
  • message Message that will be show to the user: (Type String, Default value: 'Cookies help us deliver our services. By using our services, you agree to our use of cookies.')
  • buttonMessage Text of the submit action button: (Type: String, Default value: 'OK')
  • expiresIn Time needed for the cookie to expire: (Type: Number, Default value: 365)
  • link Link for more information pages: (Type: Object, Default values: { url: undefined, text: undefined, target: '_blank'})

Styling

By default the rendered component will be fixed at the bottom and will look like this:

React Cookies Consent Component

But the styles can be modified by overriding this css classes:

  1. .cookies-consent: Entire Component container.
  2. .cookies-consent-text: Container of the message showed to the user.
  3. .cookies-consent-button Container of the Button for accepting the use of cookies.
  4. .cookies-consent-link Container of the a tag for the link.

License

@cuban-engineer/react-cookies-consent is MIT-licensed.

Keywords

FAQs

Last updated on 16 Jan 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc