1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
import React from 'react'
import { CURTAIN_COLOR_LOOKUP } from 'app/constants'
import { MediaCitation, Vitrine, Gallery, Carousel, Grid } from '../components.media'
export const InlineVitrine = ({ paragraph, media, onAnnotationClick }) => {
const annotation = paragraph.annotations[0]
const item = media.lookup[annotation.settings.media_id]
const color = CURTAIN_COLOR_LOOKUP[annotation.settings.color] || CURTAIN_COLOR_LOOKUP.white
const style = {
backgroundColor: color.backgroundColor,
color: color.textColor,
}
return (
<div
className={'inline-element media vitrine ' + color.name}
style={style}
>
{annotation.settings.title && <div className='heading'>{annotation.settings.title}</div>}
<Vitrine media={item} color={color} />
</div>
)
// <MediaCitation media={item} />
}
export const InlineGallery = ({ paragraph, media, onAnnotationClick }) => {
const annotation = paragraph.annotations[0]
const item = media.lookup[annotation.settings.media_id]
return (
<div
className='inline-element media gallery'
>
<Gallery media={item} annotation={annotation} />
</div>
)
}
export const InlineCarousel = ({ paragraph, media, onAnnotationClick }) => {
const annotation = paragraph.annotations[0]
const item = media.lookup[annotation.settings.media_id]
const color = CURTAIN_COLOR_LOOKUP[annotation.settings.color] || CURTAIN_COLOR_LOOKUP.white
const style = {
backgroundColor: color.backgroundColor,
color: color.textColor,
}
return (
<div
className={'inline-element media carousel ' + color.label}
>
<div style={style} className='carousel-container'>
<Carousel media={item} />
</div>
</div>
)
}
export const InlineGrid = ({ paragraph, media, onAnnotationClick }) => {
const annotation = paragraph.annotations[0]
const item = media.lookup[annotation.settings.media_id]
return (
<div
className='inline-element media grid'
>
<Grid media={item} annotation={annotation} />
</div>
)
}
// <MediaCitation media={item} />
|