← @mortar-kit/admin

PreviewFramePropsinterface

import { PreviewFrameProps } from '@mortar-kit/admin'

interface PreviewFrameProps

Properties

url: string

URL of the app route that renders <PreviewPage>.

collection: string

The edited document's collection, by name.

body: boolean

Whether that collection has a body. Without one, the preview ignores stored entries, as the site does.

doc: Doc
refresh?: number

Bump it after saved content changes (a save, a delete): the preview reloads what bricks loaded.

selected?: string | null

The selected entry's id, outlined in the preview; null when none (or the document's fields) is selected.

onSelect?: (id: string) => void

An entry was clicked in the preview.

onLink?: (url: URL) => void

A same-origin link was ⌘/Ctrl-clicked in the preview (others open in a new tab from there).