From 4b9a1bed6672f701457102a2eecfcae046ca5bf9 Mon Sep 17 00:00:00 2001 From: Giacomo Barbalinardo Date: Tue, 4 Jun 2024 13:30:44 +0200 Subject: [PATCH] feat-fix: customClass fix, feat customOpenerClass --- README.md | 1 + projects/ngx-cookie-consent/README.md | 1 + projects/ngx-cookie-consent/package.json | 2 +- .../ngx-cookie-consent-config.service.ts | 1 + .../src/lib/ngx-cookie-consent.component.html | 4 +- .../lib/ngx-cookie-consent.component.spec.ts | 46 +++++++++++++++++++ 6 files changed, 52 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8af5c02..eb19e40 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ import { NgxCookieConsentModule } from '@localia/ngx-cookie-consent'; | showLanguageSwitcher | boolean | true | Show language switcher | | showBadgeOpener | boolean | true | Show badge opener | | openerPosition | enum | 'left-bottom' | Position of the badge eg. 'left-top', 'right-top' , 'left-bottom' , 'right-bottom' | +| customOpenerClass | string | '' | Custom class for the badge opener | | customClass | string | '' | Custom class for the cookie consent banner | | cookiePrefix | string | 'cookieconsent_' | Prefix for the cookie consent banner | | cookieExpiryDays | number | 365 | Expiry days for the cookie consent banner | diff --git a/projects/ngx-cookie-consent/README.md b/projects/ngx-cookie-consent/README.md index 8af5c02..eb19e40 100644 --- a/projects/ngx-cookie-consent/README.md +++ b/projects/ngx-cookie-consent/README.md @@ -73,6 +73,7 @@ import { NgxCookieConsentModule } from '@localia/ngx-cookie-consent'; | showLanguageSwitcher | boolean | true | Show language switcher | | showBadgeOpener | boolean | true | Show badge opener | | openerPosition | enum | 'left-bottom' | Position of the badge eg. 'left-top', 'right-top' , 'left-bottom' , 'right-bottom' | +| customOpenerClass | string | '' | Custom class for the badge opener | | customClass | string | '' | Custom class for the cookie consent banner | | cookiePrefix | string | 'cookieconsent_' | Prefix for the cookie consent banner | | cookieExpiryDays | number | 365 | Expiry days for the cookie consent banner | diff --git a/projects/ngx-cookie-consent/package.json b/projects/ngx-cookie-consent/package.json index 3f73162..a654f0a 100644 --- a/projects/ngx-cookie-consent/package.json +++ b/projects/ngx-cookie-consent/package.json @@ -1,6 +1,6 @@ { "name": "@localia/ngx-cookie-consent", - "version": "2.1.0", + "version": "2.2.0", "description": "Angular module to display a cookie consent banner without other dependencies.", "author": "Giacomo Barbalinardo ", "license": "MIT", diff --git a/projects/ngx-cookie-consent/src/lib/config/ngx-cookie-consent-config.service.ts b/projects/ngx-cookie-consent/src/lib/config/ngx-cookie-consent-config.service.ts index 021d286..d96472c 100644 --- a/projects/ngx-cookie-consent/src/lib/config/ngx-cookie-consent-config.service.ts +++ b/projects/ngx-cookie-consent/src/lib/config/ngx-cookie-consent-config.service.ts @@ -14,6 +14,7 @@ export class NgxCookieConsentConfigService { showBadgeOpener?: boolean = true; openerPosition?: 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' = 'left-bottom'; customClass?: string = ''; + customOpenerClass?: string = ''; cookiePrefix?: string = 'cookieconsent_'; cookieExpiryDays?: number = 365; showCookieDetails?: boolean = false; diff --git a/projects/ngx-cookie-consent/src/lib/ngx-cookie-consent.component.html b/projects/ngx-cookie-consent/src/lib/ngx-cookie-consent.component.html index ef9db71..0bc465a 100644 --- a/projects/ngx-cookie-consent/src/lib/ngx-cookie-consent.component.html +++ b/projects/ngx-cookie-consent/src/lib/ngx-cookie-consent.component.html @@ -1,4 +1,4 @@ -
+
@@ -263,7 +263,7 @@
{{ translate_o(other.name) }}
-
+