Options
All
  • Public
  • Public/Protected
  • All
Menu

Properties for the PostEditorBase component.

internal

Hierarchy

  • PostEditorBaseProps

Index

Properties

Optional body

body: string

The existing body of the post or comment if it is being edited, undefined otherwise.

error

error: undefined | ApolloError

Error state to be passed to the ActionButton

Optional errorMessage

errorMessage: string

Error message to be passed to the ActionButton

Optional isComment

isComment: boolean

True if a comment is being edited, false otherwise.

loading

loading: boolean

Loading state to be passed to the ActionButton

Optional onCancel

onCancel: () => void

Function to be carried out when the cancel button is clicked.

Type declaration

    • (): void
    • Returns void

onSubmit

onSubmit: (values: { body?: string; title?: string }) => void

Function to be carried out when the submit button is clicked.

Type declaration

    • (values: { body?: string; title?: string }): void
    • Parameters

      • values: { body?: string; title?: string }
        • Optional body?: string
        • Optional title?: string

      Returns void

submitButtonText

submitButtonText: string

Text to be displayed on the submit button.

Optional title

title: string

The existing title of the post if it is being edited.

This is always undefined if it is a comment.

Generated using TypeDoc