Defaults
The defaults of @poltura/theme-sdk/consent.
On this page
import { … } from '@poltura/theme-sdk/consent';Consent
The complete cookie consent: the banner until the shopper chooses and the preferences panel while it is open.
Consent(props: ConsentProps): ReactElement | nullThe storefront draws it on every page. A theme replaces it with the default export of src/layout/consent.tsx; the stored choice and what it lets the trackers do stay the platform's.
Props: ConsentProps
// src/layout/consent.tsx
import { ConsentBanner, ConsentPreferences, useConsent } from '@poltura/theme-sdk/consent';
export default function ThemeConsent() {
const consent = useConsent();
if (consent.decided && !consent.preferencesOpen) return null;
return consent.preferencesOpen ? <ConsentPreferences /> : <ConsentBanner className='theme-consent' />;
}See also: ConsentBanner, ConsentPreferences, useConsent