1.1.0 • Published 8 years ago

patchkit-flat-msg-thread v1.1.0

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
8 years ago

Flat Message Thread

Flat rendering of message threads

screenshot.png

import Thread from 'patchkit-flat-msg-thread'

<Thread
  id={msgId}
  suggestOptions={app.suggestOptions}
  channels={app.channels}

  onMsgChange={onMsgChange}
  onNewReply={onNewReply}

  forceRootExpanded
  live />

Options:

  • id: Required string, the ID of the thread's root message.
  • channels: Channel suggestions (array of strings).
  • suggestOptions: Suggest-box suggestions (see suggest-box).
  • live: Live update with replies to the thread?
  • forceRaw: Render all messages in the "raw" data-fields?
  • forceRootExpanded: Don't collapse the first message, even if it's been read?
  • onDidMount: Function called after first render.
  • onMsgChange: Function called after any changes to a message (flag, mark unread, upvote, etc).
  • onNewReply: Function called after the user adds a reply.
  • onClose: Function called when the user clicks on the header of the thread.

Styles

Use the .less file:

@import "node_modules/patchkit-flat-msg-thread/styles.less"