diff --git a/src/react/LogMonitor.js b/src/react/LogMonitor.js index fc738e91..e2b482e6 100644 --- a/src/react/LogMonitor.js +++ b/src/react/LogMonitor.js @@ -161,15 +161,9 @@ export default class LogMonitor {
Reset - {computedStates.length > 1 && - Revert - } - {Object.keys(skippedActions).some(key => skippedActions[key]) && - Sweep - } - {computedStates.length > 1 && - Commit - } + Revert + skippedActions[key])}>Sweep + 1}>Commit
{elements} diff --git a/src/react/LogMonitorButton.js b/src/react/LogMonitorButton.js index 81714bfc..b5a4d34e 100644 --- a/src/react/LogMonitorButton.js +++ b/src/react/LogMonitorButton.js @@ -37,22 +37,38 @@ export default class LogMonitorButton extends React.Component { this.setState({ active: false }); } + onClick() { + if (!this.props.enabled) { + return; + } + if (this.props.onClick) { + this.props.onClick(); + } + } + render() { let style = { - ...styles.base + ...styles.base, + backgroundColor: this.props.theme.base01 }; - if (this.state.hovered) { + if (this.props.enabled && this.state.hovered) { style = { ...style, backgroundColor: this.props.theme.base00 }; } + if (!this.props.enabled) { + style = { + ...style, + opacity: 0.5 + } + } return ( + style={style} onClick={::this.onClick}> {this.props.children} );