← @mortar-kit/admin/preview

PreviewPagePropsinterface

import { PreviewPageProps } from '@mortar-kit/admin/preview'

interface PreviewPageProps

Properties

bricks: readonly AnyBrick[]

The same bricks the editor uses.

content?: ContentSource

Where bricks with load read content: use uncached reads, so the preview shows what is saved now. Without it such bricks show an error.

collections?: readonly AnyCollection[]

The same collections the editor uses. A collection without a layout then previews as <DocPreview>: its title, fields and body.

layouts?: Readonly<Record<string, PreviewLayout>>

How each collection's documents preview, by collection name: usually the site's own layout, e.g. a post's title and date around its body. Without one, a collection previews as <DocPreview> (given collections), or else as its body alone.