Developers
Start building
Themes/Theme SDK/Modules/editor/Types

Types

The types of @poltura/theme-sdk/editor.

On this page
import { … } from '@poltura/theme-sdk/editor';

PreviewScenarioOption

One choice of a preview scenario, such as "Empty" for a cart.

valuerequiredstring

The value stored in the preview URL: lowercase letters, digits, `-` and `_`, up to 32 characters.

labelrequiredstring

The label shown in the customizer's Data picker.

PreviewScenarioDomain

A state the customizer can preview a component in, such as reviews present or absent.

keyrequiredstring

The domain key `usePreviewScenario` reads: lowercase letters, digits, `-` and `_`.

labelrequiredstring

The label shown in the customizer's Data picker.

requiresAuthboolean

Whether 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[]
Last updated