45 lines
1.2 KiB
JavaScript
Executable file
45 lines
1.2 KiB
JavaScript
Executable file
import React from 'react';
|
|
import className from 'classnames';
|
|
import i18n from '../i18n';
|
|
import UserSettingsModalActionCreators from '../actions/UserSettingsModalActionCreators';
|
|
import {pushLayer} from '../actions/LayerActionCreators';
|
|
import {UserSettingsSections, Layers} from '../Constants';
|
|
import '../styles/streamer_mode_enabled.styl';
|
|
|
|
const StreamerModeEnabled = React.createClass({
|
|
propTypes: {
|
|
disableButton: React.PropTypes.bool,
|
|
},
|
|
|
|
getDefaultProps() {
|
|
return {
|
|
disableButton: false,
|
|
};
|
|
},
|
|
|
|
handleClick() {
|
|
if (this.props.disableButton) return;
|
|
pushLayer(Layers.USER_SETTINGS);
|
|
UserSettingsModalActionCreators.setSection(UserSettingsSections.STREAMER_MODE);
|
|
},
|
|
|
|
render() {
|
|
return (
|
|
<div className="streamer-mode-enabled">
|
|
<div className="streamer-mode-enabled-image" />
|
|
<div
|
|
className={className('streamer-mode-enabled-btn', {disabled: this.props.disableButton})}
|
|
onClick={this.handleClick}>
|
|
{i18n.Messages.STREAMER_MODE_ENABLED}
|
|
</div>
|
|
</div>
|
|
);
|
|
},
|
|
});
|
|
|
|
export default StreamerModeEnabled;
|
|
|
|
|
|
|
|
// WEBPACK FOOTER //
|
|
// ./discord_app/components/StreamerModeEnabled.js
|