Skip to content

Add the ability to customize the preview error #3208

Open
@scottapow

Description

@scottapow

For our implementation we would like to add a support message under the error message (rendered by <PreviewError />) so that the user has some recourse.

This could be done through a render prop on the ContentPreview component, providing the defaultRender or errorCode as arguments; much like the renderCustomActionButtons on `.

Example:

    <ContentPreview
        fileId={FILE_ID}
        token={TOKEN}
        renderCustomErrorMessage={(defaultRender) => (
            <>
                {defaultRender()}
                <p>Please contact support at +1 (234) 567-8910</p>
            </>
        )}
    />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions