summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_body_additional_content.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-14 07:17:31 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-14 07:17:31 -0400
commitbf7ae0711743926cfbb031675cc3320d7a942465 (patch)
tree44ad955ae2dba1991c8b7b7986d90c1a79cdfb65 /web/react/components/post_body_additional_content.jsx
parent975159b52ac6bf0ee6b2d5b73d2391b2e0c6e165 (diff)
parent72ed22d7421f50bc686e5adaea2f4a416fcbad27 (diff)
downloadchat-bf7ae0711743926cfbb031675cc3320d7a942465.tar.gz
chat-bf7ae0711743926cfbb031675cc3320d7a942465.tar.bz2
chat-bf7ae0711743926cfbb031675cc3320d7a942465.zip
Merge branch 'release-2.1'
Diffstat (limited to 'web/react/components/post_body_additional_content.jsx')
-rw-r--r--web/react/components/post_body_additional_content.jsx20
1 files changed, 14 insertions, 6 deletions
diff --git a/web/react/components/post_body_additional_content.jsx b/web/react/components/post_body_additional_content.jsx
index c2a928f3b..70b3c8dbf 100644
--- a/web/react/components/post_body_additional_content.jsx
+++ b/web/react/components/post_body_additional_content.jsx
@@ -112,24 +112,32 @@ export default class PostBodyAdditionalContent extends React.Component {
}
render() {
- var generateEmbed = this.generateEmbed();
+ const generateEmbed = this.generateEmbed();
+
if (generateEmbed) {
- return (
- <div>
+ let toggle;
+ if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMBED_TOGGLE)) {
+ toggle = (
<a className='post__embed-visibility'
data-expanded={this.state.embedVisible}
aria-label='Toggle Embed Visibility'
onClick={this.toggleEmbedVisibility}
- >
- </a>
+ />
+ );
+ }
+
+ return (
+ <div>
+ {toggle}
<div className='post__embed-container'
hidden={!this.state.embedVisible}
>
{generateEmbed}
</div>
</div>
- );
+ );
}
+
return null;
}
}