import React, {PureComponent, PropTypes} from 'react'; import autobind from 'autobind-decorator'; import HelpTooltip from '../help-tooltip'; import {isMac} from '../../../common/constants'; @autobind class General extends PureComponent { _handleUpdateSetting (e) { let value = e.target.type === 'checkbox' ? e.target.checked : e.target.value; if (e.target.type === 'number') { value = parseInt(value, 10); } this.props.updateSetting(e.target.name, value); } _handleToggleMenuBar (e) { this._handleUpdateSetting(e); this.props.handleToggleMenuBar(e.target.checked); } render () { const {settings} = this.props; return (