Types
The types of @poltura/theme-sdk/settings.
On this page
import { … } from '@poltura/theme-sdk/settings';TemplateId
A page template of the storefront, such as product or layout.header.
type TemplateId = 'account' | 'account-addresses' | 'account-order' | 'account-orders' | 'account-settings' | 'article' | 'blog' | 'cart' | 'checkout' | 'collection' | 'coming-soon' | 'consent' | 'consent-preferences' | 'contact' | 'faq' | 'guide' | 'guides' | 'home' | 'language-popup' | 'layout.footer' | 'layout.header' | 'legal' | 'login' | 'maintenance' | 'newsletter-popup' | 'not-found' | 'order-confirmed' | 'order-status' | 'page' | 'password-forgot' | 'password-reset' | 'product' | 'products' | 'register' | 'unavailable' | 'verify'TemplateSettings
The settings of a template's own locked section, such as the product information of product.
type TemplateSettings<T extends TemplateId> = [
TemplateMainSection[T]
] extends [
never
] ? Readonly<Record<never, never>> : PlatformSectionSettings<Extract<TemplateMainSection[T], PlatformSectionType>>SettingValue
A stored setting value: text, a number, a switch, or a list or group of them.
type SettingValue = string | number | boolean | null | readonly SettingValue[] | {
readonly [key: string]: SettingValue;
}ThemeSettings
The theme's settings: the platform's groups typed, the theme's own keys as stored.
type ThemeSettings = PlatformThemeSettings & Readonly<Record<string, SettingValue | undefined>>ColorScheme
One of the theme's named colour schemes, as a section or block draws in it.
idrequiredstringThe id sections and blocks pick the scheme by, such as `accent`.
namerequiredstringThe scheme's name, as the merchant sees it in the customizer.
colorsrequired{ readonly background: string; readonly foreground: string; readonly primary: string; readonly primaryForeground: string; readonly secondary: string; readonly muted: string; readonly border: string; readonly accent: string; readonly button: string; readonly buttonLabel: string; }The scheme's colours, each a `#rrggbb` hex.
gradientrequiredstring | nullA linear gradient the box paints over its ground, or null.