p5.js-web-editor/shared/redux/reducers/preferences.js

19 lines
362 B
JavaScript
Raw Normal View History

2016-06-17 19:37:29 +02:00
import * as ActionTypes from '../constants/constants';
const initialState = {
isPreferencesShowing: false
}
const preferences = (state = initialState, action) => {
switch (action.type) {
case ActionTypes.TOGGLE_PREFERENCES:
return {
isPreferencesShowing: !state.isPreferencesShowing
}
default:
return state
}
}
export default preferences;