patchkit-flat-msg-thread
v1.1.0
Published
Flat rendering of message threads
Downloads
2
Readme
Flat Message Thread
Flat rendering of message threads
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"