Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • object
  • object
    • IProps

Index

Properties

Optional MessageComponent

MessageComponent: MessageComponent<T>

Used when the message should be rendered. Defaults to the Bubble component

Optional SuggestionComponent

SuggestionComponent: SuggestionComponent

Used when an input should be rendered. Defaults to the Bubble component

Methods

children

  • children(onRenderMessage: function, onRenderInput: function): React.ReactNode
  • Parameters

    • onRenderMessage: function
        • (message: IMessageImmutable<T>, index: number, disabled: boolean): Element
        • Parameters

          • message: IMessageImmutable<T>
          • index: number
          • disabled: boolean

          Returns Element

    • onRenderInput: function
        • (input: IInputImmutable): Promise<Element>
        • Parameters

          • input: IInputImmutable

          Returns Promise<Element>

    Returns React.ReactNode

Optional onRenderInput

  • onRenderInput(data: IInputImmutable, style: TextStyle, us: boolean, theme: ITheme | undefined): Promise<Element>
  • Performs rendering of a suggested input.

    Parameters

    • data: IInputImmutable

      the message data to render

    • style: TextStyle

      suggested styling for text

    • us: boolean

      determines if the message was sent from the current user

    • theme: ITheme | undefined

      the theme to use for rendering the data

    Returns Promise<Element>

    a rendered element to display

onRenderMessage

  • onRenderMessage(data: T, style: TextStyle, us: boolean, theme: ITheme | undefined): Element
  • Performs rendering of a message.

    Parameters

    • data: T

      the message data to render

    • style: TextStyle

      suggested styling for text

    • us: boolean

      determines if the message was sent from the current user

    • theme: ITheme | undefined

      the theme to use for rendering the data

    Returns Element

    a rendered element to display