Fix styling and toggle off issues

This commit is contained in:
Chi Vinh Le
2018-03-05 20:53:01 +01:00
parent 77274be2e4
commit aa754657a2
2 changed files with 9 additions and 8 deletions
@@ -1,6 +1,6 @@
.title {
display: inline-block;
width: 270px;
width: 100%;
cursor: pointer;
user-select: none;
@@ -16,6 +16,5 @@
}
.checkBox {
width: 100%;
text-align: right;
}
@@ -15,13 +15,15 @@ class SettingsContainer extends React.Component {
};
indicateOn = plugin =>
this.setState({
hasNotifications: this.state.hasNotifications.concat(plugin),
});
this.setState(state => ({
hasNotifications: state.hasNotifications.concat(plugin),
}));
indicateOff = plugin =>
this.setState({
hasNotifications: this.state.hasNotifications.filter(i => i !== plugin),
});
this.setState(state => ({
hasNotifications: state.hasNotifications.filter(i => i !== plugin),
}));
setTurnOffInputFragment = fragment =>
this.setState(state => ({
turnOffInput: { ...state.turnOffInput, ...fragment },