nextjs-cookie-consent
Version:
A GDPR/DSGVO-compliant cookie consent banner for Next.js
18 lines (17 loc) • 434 B
TypeScript
export interface CookieCategory {
key: string;
label: string;
}
export interface ConsentState {
[key: string]: boolean;
necessary: boolean;
}
export interface CookieBannerProps {
categories?: CookieCategory[];
content?: React.ReactNode;
storageStrategy?: 'localStorage' | 'cookie';
}
export interface ConsentContextType {
consent: ConsentState;
updateConsent: (newConsent: ConsentState) => void;
}