Types
Ez az oldal még csak angolul érhető el.
The types of @poltura/theme-sdk/editor.
Ezen az oldalon
import { … } from '@poltura/theme-sdk/editor';PreviewScenarioOption
One choice of a preview scenario, such as "Empty" for a cart.
valuerequiredstringThe value stored in the preview URL: lowercase letters, digits, `-` and `_`, up to 32 characters.
labelrequiredstringThe label shown in the customizer's Data picker.
PreviewScenarioDomain
A state the customizer can preview a component in, such as reviews present or absent.
keyrequiredstringThe domain key `usePreviewScenario` reads: lowercase letters, digits, `-` and `_`.
labelrequiredstringThe label shown in the customizer's Data picker.
requiresAuthbooleanWhether the domain only means something while previewing a signed-in shopper.
optionsrequiredreadonly PreviewScenarioOption[]Two to six choices; the first one is what shoppers always see.
PreviewScenarios
The preview scenarios a theme declares in src/preview-scenarios.ts.
type PreviewScenarios = readonly PreviewScenarioDomain[]