OptionalapiOptions?: Readonly<API Options to use when previewing.
OptionallegacyPerseusLint?: readonly string[]OptionallinterContext?: LinterContextPropsThe type of device to simulate the preview for. Note that this preview may not be 100% accurate with regards to styling (due to styles that use media queries based on the screen width).
Optionalquestion?: PerseusRendererThe Perseus question to preview.
OptionalreviewMode?: booleanWhether the preview is in review mode. When true, widgets will show correct answers with explanations and prevent interaction.
Optionalseamless?: booleanWhen true, renders a seamless preview without any extra spacing. When
false, renders a gutter where linting issues are displayed.
The
ContentPreviewcomponent provides a simple preview system for Perseus Content. Due to how Persus styles are built, the preview styling matches the current device based on the viewport width (using@mediaqueries formin-widthandmax-width).The preview will render the mobile variant (styling and layout) when the
previewDeviceis phone or tablet. Note that the styling cannot be matched 100% due to the above@mediaquery limitation.