2018-05-03 02:43:23 +00:00
|
|
|
### With a contact
|
|
|
|
|
|
|
|
#### Including all data types
|
|
|
|
|
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contact = {
|
|
|
|
name: {
|
|
|
|
displayName: 'Someone Somewhere',
|
|
|
|
},
|
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-0000',
|
|
|
|
type: 1,
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
],
|
|
|
|
avatar: {
|
2018-06-27 20:53:49 +00:00
|
|
|
avatar: {
|
2018-07-09 21:29:13 +00:00
|
|
|
path: util.gifObjectUrl,
|
2018-05-03 02:43:23 +00:00
|
|
|
},
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
onClick: () => console.log('onClick'),
|
|
|
|
onSendMessage: () => console.log('onSendMessage'),
|
2019-03-15 22:18:00 +00:00
|
|
|
signalAccount: '+12025550000',
|
2018-07-09 21:29:13 +00:00
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
collapseMetadata
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-06-27 20:53:49 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
2019-01-30 20:15:07 +00:00
|
|
|
#### Image download pending
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
const contact = {
|
|
|
|
name: {
|
|
|
|
displayName: 'Someone Somewhere',
|
|
|
|
},
|
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-0000',
|
|
|
|
type: 1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
avatar: {
|
|
|
|
avatar: {
|
|
|
|
pending: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onClick: () => console.log('onClick'),
|
|
|
|
onSendMessage: () => console.log('onSendMessage'),
|
2019-03-15 22:18:00 +00:00
|
|
|
signalAccount: '+12025550000',
|
2019-01-30 20:15:07 +00:00
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2019-01-30 20:15:07 +00:00
|
|
|
<Message
|
|
|
|
authorColor="green"
|
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
|
|
|
timestamp={Date.now()}
|
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2019-01-30 20:15:07 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2019-01-30 20:15:07 +00:00
|
|
|
<Message
|
|
|
|
authorColor="green"
|
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
|
|
|
timestamp={Date.now()}
|
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2019-01-30 20:15:07 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2019-01-30 20:15:07 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
2018-07-09 21:29:13 +00:00
|
|
|
#### Really long data
|
2018-06-27 20:53:49 +00:00
|
|
|
|
2019-11-15 02:12:31 +00:00
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contact = {
|
|
|
|
name: {
|
2019-11-15 02:12:31 +00:00
|
|
|
displayName:
|
|
|
|
'Dr. First Middle Last Junior Senior and all that and a bag of chips',
|
2018-07-09 21:29:13 +00:00
|
|
|
},
|
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-0000 0000 0000 0000 0000 0000 0000 0000 0000 0000',
|
|
|
|
type: 1,
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
],
|
|
|
|
avatar: {
|
2018-06-27 20:53:49 +00:00
|
|
|
avatar: {
|
2018-07-09 21:29:13 +00:00
|
|
|
path: util.gifObjectUrl,
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-09-26 00:26:06 +00:00
|
|
|
<Message
|
2019-11-15 02:12:31 +00:00
|
|
|
authorColor="green"
|
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
|
|
|
timestamp={Date.now()}
|
|
|
|
contact={contact}
|
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2019-11-15 02:12:31 +00:00
|
|
|
<Message
|
|
|
|
authorColor="green"
|
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
|
|
|
timestamp={Date.now()}
|
|
|
|
contact={contact}
|
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-05-03 02:43:23 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### In group conversation
|
|
|
|
|
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contact = {
|
|
|
|
name: {
|
|
|
|
displayName: 'Someone Somewhere',
|
|
|
|
},
|
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-0000',
|
|
|
|
type: 1,
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
],
|
|
|
|
avatar: {
|
2018-06-27 20:53:49 +00:00
|
|
|
avatar: {
|
2018-07-09 21:29:13 +00:00
|
|
|
path: util.gifObjectUrl,
|
2018-05-03 02:43:23 +00:00
|
|
|
},
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2019-03-15 22:18:00 +00:00
|
|
|
signalAccount: '+12025550000',
|
2018-07-09 21:29:13 +00:00
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
conversationType="group"
|
|
|
|
authorName="Mr. Fire"
|
|
|
|
authorAvatarPath={util.gifObjectUrl}
|
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
authorName="Mr. Fire"
|
|
|
|
conversationType="group"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
conversationType="group"
|
|
|
|
authorName="Mr. Fire"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-05-03 02:43:23 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### If contact has no signal account
|
|
|
|
|
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contact = {
|
|
|
|
name: {
|
|
|
|
displayName: 'Someone Somewhere',
|
|
|
|
},
|
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-0000',
|
|
|
|
type: 1,
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
],
|
|
|
|
avatar: {
|
2018-06-27 20:53:49 +00:00
|
|
|
avatar: {
|
2018-07-09 21:29:13 +00:00
|
|
|
path: util.gifObjectUrl,
|
2018-05-03 02:43:23 +00:00
|
|
|
},
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
collapseMetadata
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-05-03 02:43:23 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### With organization name instead of name
|
|
|
|
|
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contact = {
|
|
|
|
organization: 'United Somewheres, Inc.',
|
|
|
|
email: [
|
|
|
|
{
|
|
|
|
value: 'someone@somewheres.com',
|
|
|
|
type: 2,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
avatar: {
|
2018-06-27 20:53:49 +00:00
|
|
|
avatar: {
|
2018-07-09 21:29:13 +00:00
|
|
|
path: util.gifObjectUrl,
|
2018-05-03 02:43:23 +00:00
|
|
|
},
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
collapseMetadata
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-05-03 02:43:23 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
2018-05-08 23:53:18 +00:00
|
|
|
#### No displayName or organization
|
|
|
|
|
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contact = {
|
|
|
|
name: {
|
|
|
|
givenName: 'Someone',
|
|
|
|
},
|
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-1000',
|
|
|
|
type: 1,
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
],
|
|
|
|
avatar: {
|
2018-06-27 20:53:49 +00:00
|
|
|
avatar: {
|
2018-07-09 21:29:13 +00:00
|
|
|
path: util.gifObjectUrl,
|
2018-05-08 23:53:18 +00:00
|
|
|
},
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2019-03-15 22:18:00 +00:00
|
|
|
signalAccount: '+12025551000',
|
2018-07-09 21:29:13 +00:00
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
collapseMetadata
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-05-08 23:53:18 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
2018-05-03 02:43:23 +00:00
|
|
|
#### Default avatar
|
|
|
|
|
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contact = {
|
|
|
|
name: {
|
|
|
|
displayName: 'Someone Somewhere',
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-1001',
|
|
|
|
type: 1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
collapseMetadata
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-05-03 02:43:23 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Empty contact
|
|
|
|
|
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contact = {};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
collapseMetadata
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contact}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-05-03 02:43:23 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Contact with caption (cannot currently be sent)
|
|
|
|
|
|
|
|
```jsx
|
2018-07-09 21:29:13 +00:00
|
|
|
const contactWithAccount = {
|
|
|
|
name: {
|
|
|
|
displayName: 'Someone Somewhere',
|
|
|
|
},
|
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-0000',
|
|
|
|
type: 1,
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2018-07-09 21:29:13 +00:00
|
|
|
],
|
|
|
|
avatar: {
|
2018-06-27 20:53:49 +00:00
|
|
|
avatar: {
|
2018-07-09 21:29:13 +00:00
|
|
|
path: util.gifObjectUrl,
|
2018-05-03 02:43:23 +00:00
|
|
|
},
|
2018-06-27 20:53:49 +00:00
|
|
|
},
|
2019-03-15 22:18:00 +00:00
|
|
|
signalAccount: '+12025550000',
|
2018-07-09 21:29:13 +00:00
|
|
|
};
|
|
|
|
const contactWithoutAccount = {
|
|
|
|
name: {
|
|
|
|
displayName: 'Someone Somewhere',
|
|
|
|
},
|
|
|
|
number: [
|
|
|
|
{
|
|
|
|
value: '(202) 555-0000',
|
|
|
|
type: 1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
avatar: {
|
|
|
|
avatar: {
|
|
|
|
path: util.gifObjectUrl,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2019-11-21 19:16:06 +00:00
|
|
|
<util.ConversationContext theme={util.theme} ios={util.ios} mode={util.mode}>
|
2019-05-31 22:42:01 +00:00
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
|
|
|
text="I want to introduce you to Someone..."
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contactWithAccount}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
|
|
|
text="I want to introduce you to Someone..."
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contactWithAccount}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
|
|
|
text="I want to introduce you to Someone..."
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contactWithAccount}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
|
|
|
text="I want to introduce you to Someone..."
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contactWithAccount}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
|
|
|
text="I want to introduce you to Someone..."
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contactWithoutAccount}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
|
|
|
text="I want to introduce you to Someone..."
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
collapseMetadata
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contactWithoutAccount}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
|
|
|
text="I want to introduce you to Someone..."
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="incoming"
|
|
|
|
collapseMetadata
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contactWithoutAccount}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
|
|
|
<div className="module-message-container">
|
2018-07-09 21:29:13 +00:00
|
|
|
<Message
|
|
|
|
text="I want to introduce you to Someone..."
|
2018-10-09 22:56:14 +00:00
|
|
|
authorColor="green"
|
2018-07-09 21:29:13 +00:00
|
|
|
direction="outgoing"
|
|
|
|
collapseMetadata
|
|
|
|
status="delivered"
|
|
|
|
i18n={util.i18n}
|
2018-09-05 19:07:53 +00:00
|
|
|
timestamp={Date.now()}
|
2018-07-09 21:29:13 +00:00
|
|
|
contact={contactWithoutAccount}
|
2019-11-15 02:12:31 +00:00
|
|
|
selectMessage={(...args) => console.log('selectMessage', args)}
|
2018-07-09 21:29:13 +00:00
|
|
|
/>
|
2019-05-31 22:42:01 +00:00
|
|
|
</div>
|
2018-05-03 02:43:23 +00:00
|
|
|
</util.ConversationContext>;
|
|
|
|
```
|