diff options
Diffstat (limited to 'frontend/site/projects/museum/views/text.overlay.js')
| -rw-r--r-- | frontend/site/projects/museum/views/text.overlay.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/frontend/site/projects/museum/views/text.overlay.js b/frontend/site/projects/museum/views/text.overlay.js index 65fc3b2..9627901 100644 --- a/frontend/site/projects/museum/views/text.overlay.js +++ b/frontend/site/projects/museum/views/text.overlay.js @@ -48,8 +48,10 @@ class TextOverlay extends Component { render() { const { open, content } = this.state - if (!this.props.interactive || !content) return null - if (!open) { + const { popups, interactive } = this.props + if (!interactive || !content) return null + if (content.popup && !popups[content.popup]) return null + if (!content.popup && !open) { return ( <div className="text-overlay-icon" @@ -64,7 +66,10 @@ class TextOverlay extends Component { return ( <div className="text-overlay" - style={content.style} + style={{ + ...content.style, + ...(content.textStyle || {}), + }} onClick={this.toggle} dangerouslySetInnerHTML={{ __html: content.text }} /> @@ -73,6 +78,7 @@ class TextOverlay extends Component { } const mapStateToProps = state => ({ + popups: state.site.popups, interactive: state.site.interactive, }) |
