2018-07-09 21:29:13 +00:00
|
|
|
## With image
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
const message = {
|
|
|
|
id: '1',
|
2018-07-18 23:00:51 +00:00
|
|
|
thumbnailObjectUrl: 'https://placekitten.com/76/67',
|
2018-07-09 21:29:13 +00:00
|
|
|
attachments: [
|
|
|
|
{
|
|
|
|
fileName: 'foo.jpg',
|
2018-07-18 23:00:51 +00:00
|
|
|
contentType: 'image/jpeg',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
<MediaGridItem i18n={util.i18n} message={message} />;
|
|
|
|
```
|
|
|
|
|
|
|
|
## With video
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
const message = {
|
|
|
|
id: '1',
|
|
|
|
thumbnailObjectUrl: 'https://placekitten.com/76/67',
|
|
|
|
attachments: [
|
|
|
|
{
|
|
|
|
fileName: 'foo.jpg',
|
|
|
|
contentType: 'video/mp4',
|
2018-07-09 21:29:13 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
<MediaGridItem i18n={util.i18n} message={message} />;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Without image
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
const message = {
|
|
|
|
id: '1',
|
|
|
|
attachments: [
|
|
|
|
{
|
|
|
|
fileName: 'foo.jpg',
|
|
|
|
contentType: 'application/json',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
<MediaGridItem i18n={util.i18n} message={message} />;
|
|
|
|
```
|