blob: dd4dbfe24ec0d709bcdc0d456347ad6f8d4794cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import React, { Component } from 'react'
export const Intro = ({ paragraph, media, currentParagraph, currentAnnotation, onAnnotationClick }) => {
let className = 'site-intro'
const annotation = paragraph.annotations[0]
const item = media.lookup[annotation.settings.media_id]
console.log(item)
const style = {
backgroundImage: 'url(' + item.settings.file.url + ')',
}
return (
<div
className={className}
style={style}
>
<div className='inner'>
{annotation.settings.title && <span dangerouslySetInnerHTML={{ __html: annotation.settings.title }} />}
{annotation.settings.subtitle && <span dangerouslySetInnerHTML={{ __html: annotation.settings.subtitle }} />}
</div>
</div>
)
}
|