Move configs plugin to core

This commit is contained in:
Kyle Shockey
2017-12-14 18:58:36 -08:00
parent b5c713a72b
commit 85c83931c4
6 changed files with 6 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
import { fromJS } from "immutable"
import {
UPDATE_CONFIGS,
TOGGLE_CONFIGS,
} from "./actions"
export default {
[UPDATE_CONFIGS]: (state, action) => {
return state.merge(fromJS(action.payload))
},
[TOGGLE_CONFIGS]: (state, action) => {
const configName = action.payload
const oriVal = state.get(configName)
return state.set(configName, !oriVal)
},
}