@up-group-ui/react-controls
Version:
Up shared react controls
69 lines (68 loc) • 1.72 kB
TypeScript
import React from 'react';
import './style.css';
import { CSSProperties } from 'react';
declare global {
interface Window {
klaro: any;
klaroConfig: any;
}
}
export interface TranslationModalType {
[key: string]: {
acceptAll: string;
acceptSelected: string;
decline: string;
consentNotice: {
description: string;
learnMore: string;
};
consentModal: {
title: string;
description: string;
};
ok: string;
service: {
disableAll: {
description: string;
};
};
purposes: {
[key: string]: {
title: string;
description: string;
};
};
};
}
export interface TranslationServiceType {
[key: string]: {
[key: string]: {
title: string;
description: string;
};
};
}
export declare type TranslationsProps = TranslationModalType | TranslationServiceType;
export interface AppProps {
name: string;
title?: string;
description?: string;
purposes: string[];
cookies?: [RegExp, string, string][];
onAccept?: () => void;
onInit?: () => void;
onDecline?: () => void;
default?: boolean;
optOut?: boolean;
required?: boolean;
}
export interface UpCookieConsentProps {
apps: AppProps[];
privacyPolicyUrl: string;
translations?: TranslationsProps;
cookieName?: string;
cookieExpiresAfterDays?: number;
editButtonStyle?: CSSProperties;
}
declare const UpCookiesConsentManager: React.FunctionComponent<UpCookieConsentProps>;
export default UpCookiesConsentManager;