Skip to content

Commit 939f864

Browse files
Merge pull request #127 from Detaysoft/meeting-message
MeetingMessage created
2 parents 717e512 + 3692803 commit 939f864

10 files changed

Lines changed: 732 additions & 4 deletions

File tree

README.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ import { MessageBox } from 'react-chat-elements'
143143
| onTitleClick | none | function | message title on click event |
144144
| onForwardClick | none | function | message forward on click event |
145145
| onReplyClick | none | function | message reply on click event |
146+
| onMeetingMessageClick | none | function | meeting message on click event |
147+
| onMeetingTitleClick | none | function | meeting title message on click event |
148+
| onMeetingVideoLinkClick | none | function | meeting video link message on click event |
146149
| onReplyMessageClick | none | function | reply message on click event |
147150
| onContextMenu | none | function | message contextmenu click event |
148151
| forwarded | none | boolean | message forward icon |
@@ -177,6 +180,66 @@ import { MessageBox } from 'react-chat-elements'
177180
![reply-message](https://user-images.githubusercontent.com/15075759/80224625-9dbbeb00-8652-11ea-994f-022be0cffe30.png)
178181

179182

183+
## MeetingMessage Component
184+
185+
```javascript
186+
import { MeetingMessage } from 'react-chat-elements'
187+
188+
<MeetingMessage
189+
subject={'New Release'}
190+
title={'in ullamco'}
191+
date={new Date()}
192+
collapseTitle={'Commodo aliquip'}
193+
participants={[
194+
{
195+
id: '1',
196+
title: 'Facebook',
197+
},
198+
.
199+
.
200+
.
201+
]}
202+
dataSource={[
203+
{
204+
id: '1',
205+
avatar: 'https://facebook.github.io/react/img/logo.svg',
206+
message: 'Lorem ipsum dolor sit amet.',
207+
title: 'Elit magna',
208+
avatarFlexible: true,
209+
date: new Date(),
210+
event: {[
211+
title: 'Toplantı sona erdi!',
212+
avatars={[
213+
src: 'https://facebook.github.io/react/img/logo.svg'
214+
]}
215+
]}
216+
record: {[
217+
avatar: 'https://facebook.github.io/react/img/logo.svg',
218+
title: 'Arama',
219+
savedBy: 'Kaydeden: Elit magna',
220+
time: new Date(),
221+
]}
222+
},
223+
.
224+
.
225+
.
226+
]} />
227+
```
228+
229+
#### MeetingMessage props
230+
231+
| prop | default | type | description |
232+
| ---- | ---- | ---- | ---- |
233+
| subject | none | string | Meeting messagee |
234+
| title | none | string | Meeting title |
235+
| date | new Date() | Date | Meeting date |
236+
| collapseTitle | none | string | Meeting subtitle |
237+
| participants | [] | array | Meeting participant array |
238+
| dataSource | [] | array | meeting list array |
239+
| onMeetingMessageClick | none | function | meeting message on click event (message(object) is returned) |
240+
| onMeetingTitleClick | none | function | meeting title message on click event (message(object) is returned) |
241+
| onMeetingVideoLinkClick | none | function | meeting video link message on click event (message(object) is returned) |
242+
180243
## SystemMessage Component
181244

182245
```javascript
@@ -569,7 +632,9 @@ import { MeetingItem } from 'react-chat-elements'
569632
<MeetingItem
570633
subject={'New Release!!!'}
571634
avatars={[
572-
src: 'https://facebook.github.io/react/img/logo.svg'
635+
{
636+
src: 'https://facebook.github.io/react/img/logo.svg'
637+
}
573638
]}
574639
onMeetingClick={console.log}
575640
onShareClick={console.log}

example/App.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ export class App extends Component {
8888
case 4:
8989
type = 'spotify';
9090
break;
91+
case 5:
92+
type = 'meeting';
93+
break;
9194
default:
9295
type = 'text';
9396
status = 'read';
@@ -104,6 +107,36 @@ export class App extends Component {
104107
titleColor: this.getRandomColor(),
105108
message: loremIpsum({ count: 1, units: 'sentences' }),
106109
}) : null,
110+
meeting: this.token() >= 1 ? ({
111+
subject: loremIpsum({ count: 2, units: 'words' }),
112+
title: loremIpsum({ count: 2, units: 'words' }),
113+
date: +new Date(),
114+
collapseTitle: loremIpsum({ count: 2, units: 'words' }),
115+
participants: Array(this.token() + 6).fill(1).map(x => ({
116+
id: parseInt(Math.random() * 10 % 6),
117+
title: loremIpsum({ count: 1, units: 'words' }),
118+
})),
119+
dataSource: Array(this.token() + 5).fill(1).map(x => ({
120+
id: String(Math.random()),
121+
avatar: `data:image/png;base64,${this.photo()}`,
122+
message: loremIpsum({ count: 1, units: 'sentences' }),
123+
title: loremIpsum({ count: 2, units: 'words' }),
124+
avatarFlexible: true,
125+
date: +new Date(),
126+
event: {
127+
title: loremIpsum({ count: 2, units: 'words' }),
128+
avatars: Array(this.token() + 2).fill(1).map(x => ({
129+
src: `data:image/png;base64,${this.photo()}`,
130+
})),
131+
},
132+
record: {
133+
avatar: `data:image/png;base64,${this.photo()}`,
134+
title: loremIpsum({ count: 1, units: 'words' }),
135+
savedBy: 'Kaydeden: ' + loremIpsum({ count: 2, units: 'words' }),
136+
time: new Date().toLocaleString(),
137+
},
138+
})),
139+
}) : null,
107140
type: type,
108141
theme: 'white',
109142
view: 'list',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-chat-elements",
3-
"version": "10.10.3",
3+
"version": "10.11.0",
44
"description": "Reactjs chat components",
55
"author": "Avare Kodcu <abdurrahmaneker58@gmail.com>",
66
"main": "dist/main.js",

0 commit comments

Comments
 (0)