Developers
Start building
Themes/Theme SDK/Modules/editor

editor

The customizer canvas: whether the page is being edited, and preview scenarios.

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

Hooks

NameWhat it is
useIsEditingWhether the page is drawn inside the customizer canvas.
usePreviewScenarioThe choice the customizer's Data picker made for a preview domain.

Parts

NameWhat it is
SectionDropAreaThe editor's drop area for a section with no elements yet, where the merchant adds the first one; nothing outside the editor.

Definers

NameWhat it is
definePreviewScenariosDeclares the theme's own preview scenarios; default-export the result from src/preview-scenarios.ts.

Types

NameWhat it is
PreviewScenarioOptionOne choice of a preview scenario, such as "Empty" for a cart.
PreviewScenarioDomainA state the customizer can preview a component in, such as reviews present or absent.
PreviewScenariosThe preview scenarios a theme declares in src/preview-scenarios.ts.
Last updated