giacomo / ngx-cookie-consent

Angular multi-language module to display a cookie consent banner without other dependencies.
https://www.npmjs.com/package/@localia/ngx-cookie-consent
MIT License
13 stars 6 forks source link

customClass does not work. #15

Closed Gnyblast closed 1 month ago

Gnyblast commented 1 month ago

I tried adding a custom class and realized that it doesn't get appended. My config looks like as follows:

const cookieConfig = {
  showCookieDetails: false,
  showLanguageSwitcher: false,
  showBadgeOpener: false,
  showFunctionalCookies: false,
  showMarketingCookies: false,
  showOtherTools: false,
  customClass: "custom-banner",
  cookiePrefix: "logeks"
};

but in html it doesn't get appended to none of the elements.

Can you also please consider adding a config value for "opener" to be able to set class to that too? I'd like to have my colors for opener.

Also this might be a different ticket but, when accept or deny is clicked, I think you should emit something outside to let the app know something is clicked, so that some further actions can be taken like: google analytics consent mode.

giacomo commented 1 month ago

@Gnyblast good catch! 👍

Just released v2.2.0 customClass should now work as expected. customOpenerClass added for opener.

Also this might be a different ticket but, when accept or deny is clicked, I think you should emit something outside to let the app know something is clicked, so that some further actions can be taken like: google analytics consent mode.

You could open a new issue therefore with a detailed description so i can also test it.

Gnyblast commented 1 month ago

@giacomo Thanks a lot for the implementation. I'll have it checked in next hours.

You could open a new issue therefore with a detailed description so i can also test it.

Yeah ok I'll create a ticket for this.