2018-11-28 09:05:35 +01:00
|
|
|
import * as React from "react";
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
|
|
|
|
export interface CookieConsentProps {
|
|
|
|
location?: "top" | "bottom" | "none";
|
2020-05-23 22:36:28 +02:00
|
|
|
sameSite?: "strict" | "lax" | "none";
|
|
|
|
cookieSecurity?: boolean;
|
2018-11-28 09:05:35 +01:00
|
|
|
style?: object;
|
|
|
|
buttonStyle?: object;
|
2019-04-06 00:25:15 +02:00
|
|
|
declineButtonStyle?: object;
|
2018-11-28 09:05:35 +01:00
|
|
|
contentStyle?: object;
|
|
|
|
children?: React.ReactNode;
|
|
|
|
disableStyles?: boolean;
|
|
|
|
hideOnAccept?: boolean;
|
2020-11-02 19:43:03 +01:00
|
|
|
onAccept?: Function;
|
2019-04-06 00:25:15 +02:00
|
|
|
onDecline?: Function;
|
2018-11-28 09:05:35 +01:00
|
|
|
buttonText?: Function | React.ReactNode;
|
2019-04-06 00:25:15 +02:00
|
|
|
declineButtonText?: Function | React.ReactNode;
|
2018-11-28 09:05:35 +01:00
|
|
|
cookieName?: string;
|
|
|
|
cookieValue?: string | boolean | number;
|
2019-04-06 00:25:15 +02:00
|
|
|
declineCookieValue?: string | boolean | number;
|
2019-08-19 19:10:23 +02:00
|
|
|
setDeclineCookie?: boolean;
|
2018-11-28 09:05:35 +01:00
|
|
|
debug?: boolean;
|
|
|
|
expires?: number;
|
|
|
|
containerClasses?: string;
|
|
|
|
contentClasses?: string;
|
2020-07-23 12:50:54 +02:00
|
|
|
buttonWrapperClasses?: string;
|
2018-11-28 09:05:35 +01:00
|
|
|
buttonClasses?: string;
|
2019-04-06 00:25:15 +02:00
|
|
|
declineButtonClasses?: string;
|
2018-11-28 09:05:35 +01:00
|
|
|
buttonId?: string;
|
2019-04-06 00:25:15 +02:00
|
|
|
declineButtonId?: string;
|
2018-11-28 09:05:35 +01:00
|
|
|
extraCookieOptions?: object;
|
2019-04-06 00:25:15 +02:00
|
|
|
disableButtonStyles?: boolean;
|
|
|
|
enableDeclineButton?: boolean;
|
2019-05-03 12:07:12 +02:00
|
|
|
flipButtons?: boolean;
|
2020-05-10 11:32:06 +02:00
|
|
|
ButtonComponent?: React.ElementType;
|
2020-06-17 10:29:15 +02:00
|
|
|
overlay?: boolean;
|
|
|
|
overlayClasses?: string;
|
|
|
|
overlayStyle?: object;
|
2020-10-13 22:13:09 +02:00
|
|
|
ariaAcceptLabel?: string;
|
|
|
|
ariaDeclineLabel?: string;
|
2018-11-28 09:05:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
|
|
|
|
|
|
|
|
export { Cookies };
|