From 7bd747a796754d882471ea7fca8a6357f3209849 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 13 Apr 2018 18:01:02 -0700 Subject: [PATCH] ConversationContext: conversationType => type And a group conversation example to messages.md --- ts/components/conversation/Message.md | 25 +++++++++++++++++++++++++ ts/components/conversation/Quote.md | 2 +- ts/styleguide/ConversationContext.tsx | 6 +++--- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ts/components/conversation/Message.md b/ts/components/conversation/Message.md index 0152fa2270..262ec7db4d 100644 --- a/ts/components/conversation/Message.md +++ b/ts/components/conversation/Message.md @@ -34,6 +34,31 @@ const View = Whisper.MessageView; ``` +### In a group conversation + +```jsx +const outgoing = new Whisper.Message({ + type: 'outgoing', + body: 'How are you doing this fine day?', + sent_at: Date.now() - 18000, +}); +const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, { + source: '+12025550003', + type: 'incoming', +})); +const View = Whisper.MessageView; + + + + +``` + ### With an attachment #### Image with caption diff --git a/ts/components/conversation/Quote.md b/ts/components/conversation/Quote.md index fb6920e94b..ae4cd87d4b 100644 --- a/ts/components/conversation/Quote.md +++ b/ts/components/conversation/Quote.md @@ -88,7 +88,7 @@ const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, { }), })); const View = Whisper.MessageView; - + { public render() { - const { theme, conversationType } = this.props; + const { theme, type } = this.props; return (
-
+
    {this.props.children}