2.1.4 • Published 3 years ago

cookies-policy v2.1.4

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
3 years ago

Cookies policy banner

NPM version

This module creates and manage a cookies banner. You can customize texts and styles as you wish.

How do I get set up?

  • Install package with
npm i cookies-policy
  • Import this module via JS.
import Cookies from './node_modules/cookies-policy/index.js';
  • Call the init method
Cookies.init([options]);

How do I customize things?

You can set the text/button text after initializing the banner. All you need to do is call setText(string) or setButtonText(string) methods.

Otherwise, if you need to customize the styles then you need to pass your styles as an string in .init() method as a param, like this:

Cookies.init({
    customCss: `
    .m-cookies-policy {
        background-color: cornflowerblue;
        padding: 8px 16px;
        ...
    }
    `
}); 

To-Do

  • Improve CSS customization.
  • ...
2.1.4

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago