UNPKG

@tantainnovative/ndpr-toolkit

Version:

Nigerian Data Protection Compliance Toolkit for implementing NDPR and DPA compliant features

51 lines 1.74 kB
import React, { ReactNode } from 'react'; import { ConsentProviderProps, ConsentCategories, ConsentActions } from '@/contexts/ConsentContext'; import { ConsentBanner } from './ConsentBanner'; import { ConsentSettings } from './ConsentSettings'; export interface BannerProps { onAcceptAll: () => void; onRejectAll: () => void; onOpenSettings: () => void; } export interface SettingsProps { consentState: ConsentCategories; onUpdateConsent: (category: keyof ConsentCategories, value: boolean) => void; onSave: () => void; onClose: () => void; } export interface RenderProps { consents: ConsentCategories; actions: ConsentActions; ui: { showBanner: boolean; showSettings: boolean; openSettings: () => void; closeSettings: () => void; }; } export interface ConsentManagerProps extends Omit<ConsentProviderProps, 'children'> { children?: ReactNode | ((props: RenderProps) => ReactNode); headless?: boolean; renderBanner?: (props: BannerProps) => ReactNode; renderSettings?: (props: SettingsProps) => ReactNode; components?: { Banner?: React.ComponentType<any>; Settings?: React.ComponentType<any>; }; theme?: { primaryColor?: string; textColor?: string; backgroundColor?: string; }; position?: 'top' | 'bottom' | 'center'; animation?: 'slide' | 'fade' | 'none'; fullWidth?: boolean; maxWidth?: string; } interface ConsentManagerComponent extends React.FC<ConsentManagerProps> { Banner: typeof ConsentBanner; Settings: typeof ConsentSettings; } declare const ConsentManager: ConsentManagerComponent; export { ConsentManager }; //# sourceMappingURL=ConsentManager.d.ts.map