[RN] Allow share-room ToolbarButton to not be rendered

This commit is contained in:
Lyubo Marinov 2017-09-07 12:25:08 -05:00
parent c2ae7999ef
commit 9049f52402
1 changed files with 19 additions and 6 deletions

View File

@ -22,6 +22,16 @@ import {
import styles from './styles';
import ToolbarButton from './ToolbarButton';
/**
* The indicator which determines (at bundle time) whether there should be a
* {@code ToolbarButton} in {@code Toolbox} to expose the functionality of the
* feature share-room in the user interface of the app.
*
* @private
* @type {boolean}
*/
const _SHARE_ROOM_TOOLBAR_BUTTON = true;
/**
* Implements the conference toolbox on React Native.
*/
@ -273,12 +283,15 @@ class Toolbox extends Component {
onClick = { this.props._onToggleAudioOnly }
style = { style }
underlayColor = { underlayColor } />
<ToolbarButton
iconName = 'link'
iconStyle = { iconStyle }
onClick = { this.props._onShareRoom }
style = { style }
underlayColor = { underlayColor } />
{
_SHARE_ROOM_TOOLBAR_BUTTON
&& <ToolbarButton
iconName = 'link'
iconStyle = { iconStyle }
onClick = { this.props._onShareRoom }
style = { style }
underlayColor = { underlayColor } />
}
</View>
);