Create reducer for controls

This commit is contained in:
Colin Megill
2017-11-06 00:10:55 -08:00
parent 743e20c6fc
commit 735e81f90b
2 changed files with 16 additions and 0 deletions

14
src/reducers/controls.js vendored Normal file
View File

@@ -0,0 +1,14 @@
const Controls = (state = {
color: null,
}, action) => {
switch (action.type) {
case "color changed":
return Object.assign({}, state, {
color: action.data,
});
default:
return state;
}
};
export default Controls;

View File

@@ -4,11 +4,13 @@ import thunk from "redux-thunk";
import initialize from "./initialize";
import cells from "./cells";
import controls from "./controls";
import selectedMetadata from "./selectedMetadata";
const Reducer = combineReducers({
initialize,
cells,
controls,
selectedMetadata,
})