@economist/component-cookie-message

Reusable cookie message component

Stats

StarsIssuesVersionUpdatedCreatedSize
@economist/component-cookie-message
024.3.04 years ago6 years agoMinified + gzip package size for @economist/component-cookie-message in KB

Readme

component-cookie-message

The cookie-message component displays an EU cookie warning in the absence of a cookie named ec_cookie_message_0.

The cookie is set to 1 upon first load.

The message will not display in the test page if the cookie is set. This code will clear it:

document.cookie='ec_cookie_message_0'+'=;Max-Age=0'

Accepted CSS variables:

  • --cookiemessage-vertical-padding
  • --cookiemessage-horizontal-padding
  • --cookiemessage-min-height
  • --cookiemessage-link-hover

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.