From 108d4835d0942faf2305e702d698ae88a45022a5 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 18 Sep 2020 18:48:23 +0200 Subject: pullquote paragraph type --- .../viewer/player/components.inline/inline.text.js | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js') diff --git a/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js b/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js index 91ea506..70cf91a 100644 --- a/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js +++ b/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js @@ -26,6 +26,35 @@ export const Paragraph = ({ paragraph, currentParagraph, currentAnnotation, onAn ) } +export const Pullquote = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick }) => { + if (paragraph.hidden) return null + let className = paragraph.type + if (className !== 'paragraph') className += ' paragraph' + if (currentParagraph) className += ' current' + const firstAnnotation = paragraph.annotations[0] + return ( +
+
onAnnotationClick(e, paragraph, firstAnnotation)}>{SpeakerIcon}
+ {paragraph.annotations.map(annotation => ( + onAnnotationClick(e, paragraph, firstAnnotation)} + dangerouslySetInnerHTML={{ __html: ' ' + annotation.text + ' ' }} + /> + ))} +
+ ) +} + export const SectionHeading = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick }) => { if (paragraph.hidden) return null let className = currentParagraph ? 'section_heading current' : 'section_heading' -- cgit v1.2.3-70-g09d2