1
0

97732 ContextHelpToggleComponent added

This commit is contained in:
Koen Pauwels
2023-01-04 17:02:39 +01:00
parent 5ba45cb0fa
commit e16a3edf78
9 changed files with 71 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ const initialState: ContextHelpState = {allIconsVisible: true, models: {}};
export function contextHelpReducer(state: ContextHelpState = initialState, action: ContextHelpAction): ContextHelpState {
switch (action.type) {
case ContextHelpActionTypes.CONTEXT_HELP_TOGGLE_ICONS: {
return {...state, allIconsVisible: true};
return {...state, allIconsVisible: !state.allIconsVisible};
}
case ContextHelpActionTypes.CONTEXT_HELP_ADD: {
const newModels = {...state.models, [action.model.id]: action.model};