Cookie banner layout options; keep admin UI out of /client
CookieBanner: order, settings="modal", controls="switch", settingsActions, icon and a class slot for every element. Cookie Settings gains eyebrow, title, settingsDescription, alwaysActiveLabel and buttons.close. MaskedField, TestEmailButton and IntegrationStatusBanner import @payloadcms/ui and moved from /client to /admin; with sideEffects in package.json the site bundle no longer ships ~235 KB gz of admin code. A test walks the /client import graph to keep it that way. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -1,18 +1,28 @@
|
||||
import type { ConsentCategory } from './categories.js'
|
||||
|
||||
export type ConsentTexts = {
|
||||
/** Badge next to the necessary category (e.g. "Always active"). Empty = no badge. */
|
||||
alwaysActiveLabel?: string
|
||||
buttons: {
|
||||
acceptAll: string
|
||||
back: string
|
||||
/** Accessible label of the ✕ button closing the settings dialog. */
|
||||
close: string
|
||||
reject: string
|
||||
save: string
|
||||
settings: string
|
||||
}
|
||||
categories: Record<ConsentCategory, { description: string; title: string }>
|
||||
/** Small label above the banner title (e.g. "Privacy & cookies"). Empty = not shown. */
|
||||
eyebrow?: string
|
||||
message: string
|
||||
/** null = no privacy-policy link shown */
|
||||
privacyLink: { href: string; label: string } | null
|
||||
/** Intro under the settings title. Empty = not shown. */
|
||||
settingsDescription?: string
|
||||
settingsTitle: string
|
||||
/** Banner heading (e.g. "We respect your privacy"). Empty = not shown. */
|
||||
title?: string
|
||||
/** Policy version from the panel — a stored consent from another version asks again. */
|
||||
version?: number
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user