patchkit-flat-msg-thread

1.1.0 • Public • Published

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"

Readme

Keywords

Package Sidebar

Install

npm i patchkit-flat-msg-thread

Weekly Downloads

0

Version

1.1.0

License

GPL-3.0

Last publish

Collaborators

  • pfraze