Skip to content

Commit

Permalink
feat(core): add mobileForceFloat option in the config
Browse files Browse the repository at this point in the history
Closes #139
  • Loading branch information
tinesoft committed Jan 9, 2024
1 parent e34b18a commit 38c0346
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions libs/ngx-cookieconsent/src/lib/service/cookieconsent-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class NgcCookieConsentConfig {
/**
* If false, this prevents the popup from showing (useful for giving to control to another piece of code)
*/
enabled ?= true;
enabled? = true;
/**
* Optional (expecting a HTML element) if passed, the popup is appended to this element. default is `document.body`
*/
Expand Down Expand Up @@ -159,6 +159,11 @@ export class NgcCookieConsentConfig {
*/
autoAttach?: boolean;

/**
* Set value if floating layout should be forced for mobile devices
*/
mobileForceFloat?: boolean;

/**
* Simple whitelist for pages. specify page by:
* - using a string : '/index.html' (matches '/index.html' exactly) OR
Expand Down Expand Up @@ -204,7 +209,7 @@ export class NgcCookieConsentConfig {
ignoreClicksFrom?: string[];

// these callback hooks are called at certain points in the program execution

/**
* This is called when the popup is opened. It can be used to trigger an animation, or to attach extra handlers, etc.
*/
Expand All @@ -229,7 +234,6 @@ export class NgcCookieConsentConfig {
* This is called when the user clicks the `revoke` button. This means that their current choice has been invalidated.
*/
onRevokeChoice?: () => void;

onNoCookieLaw?: (countryCode: string, country: string) => void;

onNoCookieLaw?: (countryCode: string, country: string) => void;
}

0 comments on commit 38c0346

Please sign in to comment.