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";
|
|
|
|
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;
|
|
|
|
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;
|
|
|
|
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
|
|
|
acceptOnScroll?: boolean;
|
|
|
|
acceptOnScrollPercentage?: number;
|
|
|
|
extraCookieOptions?: object;
|
2019-04-06 00:25:15 +02:00
|
|
|
disableButtonStyles?: boolean;
|
|
|
|
enableDeclineButton?: boolean;
|
2019-05-03 12:07:12 +02:00
|
|
|
flipButtons?: boolean;
|
2019-02-26 14:01:17 +01:00
|
|
|
ButtonComponent?: Function | React.ReactElement;
|
2018-11-28 09:05:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
|
|
|
|
|
|
|
|
export { Cookies };
|