mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-11-16 00:25:16 +01:00
Fix #56 - add acceptedByScrolling to onAccept
Checking the {acceptedByScrolling} boolean property will allow you to
determine whether the acceptance was triggered by the user scrolling
(if acceptedByScrolling=true) or explicitly clicking the Accept button
(if acceptedByScrolling=false).
This commit is contained in:
2
build/index.d.ts
vendored
2
build/index.d.ts
vendored
@@ -10,7 +10,7 @@ export interface CookieConsentProps {
|
||||
children?: React.ReactNode;
|
||||
disableStyles?: boolean;
|
||||
hideOnAccept?: boolean;
|
||||
onAccept?: Function;
|
||||
onAccept?: ({ acceptedByScrolling }: { acceptedByScrolling?: boolean }) => void;
|
||||
onDecline?: Function;
|
||||
buttonText?: Function | React.ReactNode;
|
||||
declineButtonText?: Function | React.ReactNode;
|
||||
|
||||
Reference in New Issue
Block a user