react-cookie-consent/build/index.d.ts

47 lines
1.4 KiB
TypeScript
Raw Normal View History

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";
sameSite?: "strict" | "lax" | "none";
cookieSecurity?: boolean;
2018-11-28 09:05:35 +01:00
style?: object;
buttonStyle?: object;
declineButtonStyle?: object;
2018-11-28 09:05:35 +01:00
contentStyle?: object;
children?: React.ReactNode;
disableStyles?: boolean;
hideOnAccept?: boolean;
onAccept?: ({ acceptedByScrolling }: { acceptedByScrolling?: boolean }) => void;
onDecline?: Function;
2018-11-28 09:05:35 +01:00
buttonText?: Function | React.ReactNode;
declineButtonText?: Function | React.ReactNode;
2018-11-28 09:05:35 +01:00
cookieName?: string;
cookieValue?: string | boolean | number;
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;
declineButtonClasses?: string;
2018-11-28 09:05:35 +01:00
buttonId?: string;
declineButtonId?: string;
2018-11-28 09:05:35 +01:00
acceptOnScroll?: boolean;
acceptOnScrollPercentage?: number;
extraCookieOptions?: object;
disableButtonStyles?: boolean;
enableDeclineButton?: boolean;
2019-05-03 12:07:12 +02:00
flipButtons?: boolean;
ButtonComponent?: React.ElementType;
2020-06-17 10:29:15 +02:00
overlay?: boolean;
overlayClasses?: string;
overlayStyle?: object;
2018-11-28 09:05:35 +01:00
}
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
export { Cookies };