Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
raised: true,
theme: 'secondary-bg text-primary-on-secondary',
onClick: this._onMenuItem(item),
style: _extends({
color: this.props.theme.navigationTextButton,
marginRight: '0px'
}, actionButtonAdditionalStyle)
},
'' + translatedTitle
);
var languages = this.props.theme.languages;
var dropdownAdditionalStyle = this.props.theme.dropdownStyle ? this.props.theme.dropdownStyle : {};
var MenuDropdown = _react2.default.createElement(_select.Select, {
label: item.title,
options: languages,
onChange: function onChange(evt) {
return _this3.changeLanguage(evt.target.value);
},
value: this.state.selectedLanguage,
style: _extends({
color: this.props.theme.navigationTextButton
}, dropdownAdditionalStyle)
});
return (0, _responsive.renderResponsive)('menuItem' + index++, _react2.default.createElement('div', null), item.alwaysShowIcon ? MenuIcon : item.action ? MenuActionButton : item.id === 'translation' ? MenuDropdown : MenuButton);
}
}, {
return this._menu.map(function (item) {
var translatedTitle = theme.headerTranslation && _this3.state.strings && _this3.state.selectedLanguage ? _this3.state.strings[_this3.state.selectedLanguage]['title' + index] : item.title;
return _react2.default.createElement(
_list.ListItem,
{
onClick: _this3._onMenuItem(item),
key: 'menuItem' + index++ },
item.id === 'translation' ? _react2.default.createElement(_select.Select, {
label: item.title,
options: languages,
onChange: function onChange(evt) {
return _this3.changeLanguage(evt.target.value);
},
value: _this3.state.selectedLanguage,
style: {
color: theme.navigationTextButton
}
}) : _react2.default.createElement(
_list.ListItemPrimaryText,
null,
translatedTitle
)
);
});