Start adding toggle to open/close sidebar
This commit is contained in:
1 parent
4174018149
commit
c08d12cb36
7 files changed
+48
-26
No files matched your search
@@ -0,0 +1,17 @@
|
||||
const defaultState = {
|
||||
sidebarLeftOpen: true,
|
||||
sidebarRightOpen: true,
|
||||
}
|
||||
|
||||
const ui = (state = defaultState, action) => {
|
||||
switch (action.type) {
|
||||
case 'TOGGLE_LEFT_SIDEBAR':
|
||||
return Object.assign({}, state, { sidebarLeftOpen: !state.sidebarLeftOpen });
|
||||
case 'TOGGLE_RIGHT_SIDEBAR':
|
||||
return Object.assign({}, state, { sidebarRightOpen: !state.sidebarRightOpen });
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default ui;
|
||||
Reference in new issue
Block a user