react-cookie-consent/CHANGELOG.md

6.3 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

  • Added customButtonWrapperAttributes prop which allows to add custom attributes to the button wrapper div
  • Added customDeclineButtonProps to add custom properties to the decline button
  • Small version error in package.json that actually didn't make it work with React 18
  • Added support for React 18
  • Updated example and codebase to use React 18
  • Added type annotations on public functions
  • added customButtonProps that allows to use custom props with the button component. Specifically useful for library buttons components, for e.g. MUI Button.
  • hideOnDecline added to typescript files
  • Added .prettieringore
  • Added onOverlayClick which allows you to react to a click on the overlay
  • Added acceptOnOverlayClick which accepts the cookies when the overlay is clicked and runs onOverlayClick
  • customContentAttributes and customContainerAttributes are now optional in the typing file as they should be
  • Added custom attribute props for content and container
  • Configured webpack to remove self from build artefact. Should now work in Nextjs and Gatsby (only tested those..)
  • Switched from CommonJS to UMD module
  • Added missing typing
  • Added visible prop
  • Added the (optional) scrolling effect back in as it is declared legal in some countries now.

[6.2.4]

  • version bumps :)
  • Added support for IE11, the webpack generated runtime-code should not use arrow functions
  • Fixed the return type of getCookieConsentValue in the dts file.

Added the getCookieConsentValue to the dts file.

Added the exported function getCookieConsentValue to get the cookie value from custom code

Added support for React 17

removed

Accepting by scrolling is no longer allowed and has thus been removed from the package. For details see issue 88

added

Added aria labels for both the decline and accept button

changed

  • set default SameSite attribute to "lax" because browsers are already implementing the cookie policy changes.

changed

  • Fix missing buttonWrapperClasses prop in type definition

[5.1.2]

changed

  • Set cookie value before handling side-effects.
  • The overlay is now conditional. Meaning that the component behaves exactly as it did prior to 5.1.0 when you do not use the overlay

[5.1.0]

A new feature! This time it's an "overlay" on the entire website to block access whilst the cookiebar is displayed. This is all opt-in of course and the README covers it nicely (just add overlay to the props and see what happens).

We got an update picture, with a cute cat... unfortunately the cat won't be included by default:

overlay example image

[5.0.1]

  • Fixed Issue 69 by removing location from the proptypes to avoid build-time issues

[5.0.0]

added

  • CookieSecurity prop - allows securing the cookie
  • sameSite prop - allows you to set sameSite properties so browser won't warn about non-secure cookies :)

[4.1.0]

changed

  • Added CookieConsent back in as the default for the containerClasses property.

[4.0.0]

I decided to update react-cookie-consent to version 4 because this version has a buttonWrapper which will break appearance. I consider appearance a major feature.

Added

  • Changelog :D
  • A wrapper around the buttons so they always stay together. (still possible to change with css using buttonWrapperClasses)

Changed

  • Default ids for the buttons (rcc stands for react-cookie-consent, cookie-consent is blocked by some adblockers nowadays so I abbreviated it)

Updated

dependencies

  • js-cookie updated from 2.2.0 to 2.2.1

peer dependencies

  • react updated from 16.4.0 to 16.13.1

development dependencies

  • @types/js-cookie updated from 2.2.2 to 2.2.6
  • babel-cli updated from 6.24.1 to 6.26.0
  • babel-preset-env updated from 1.5.1 to 1.7.0
  • react updated from 16.8.6 to 16.13.1