Files
swagger-ui/src/plugins/configs/actions.js
Josh Ponelat 50b318c5d9 Create a configs plugin
This starts to migrate configs to state
2017-10-25 09:59:54 +02:00

21 lines
429 B
JavaScript

export const UPDATE_CONFIGS = "configs_update"
export const TOGGLE_CONFIGS = "configs_toggle"
// Update the configs, with a merge ( not deep )
export function update(configName, configValue) {
return {
type: UPDATE_CONFIGS,
payload: {
[configName]: configValue
},
}
}
// Toggle's the config, by name
export function toggle(configName) {
return {
type: TOGGLE_CONFIGS,
payload: configName,
}
}