mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-08-01 07:04:34 +02:00
Merge branch 'master' of github.com:Mastermindzh/react-cookie-consent into develop
This commit is contained in:
1
build/index.d.ts
vendored
1
build/index.d.ts
vendored
@@ -31,6 +31,7 @@ export interface CookieConsentProps {
|
||||
extraCookieOptions?: object;
|
||||
disableButtonStyles?: boolean;
|
||||
enableDeclineButton?: boolean;
|
||||
flipButtons?: boolean;
|
||||
ButtonComponent?: Function | React.ReactElement;
|
||||
}
|
||||
|
||||
|
@@ -611,8 +611,8 @@ var CookieConsent = function (_Component) {
|
||||
this.setState({ visible: true });
|
||||
}
|
||||
|
||||
// if acceptOnScroll is set to true and cookie is undefined or debug is set to true, add a listener.
|
||||
if (this.props.acceptOnScroll && _jsCookie2.default.get(cookieName) === undefined || debug) {
|
||||
// if acceptOnScroll is set to true and (cookie is undefined or debug is set to true), add a listener.
|
||||
if (this.props.acceptOnScroll && (_jsCookie2.default.get(cookieName) === undefined || debug)) {
|
||||
window.addEventListener("scroll", this.handleScroll, { passive: true });
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user