25 lines
497 B
JavaScript
Raw Normal View History

2020-02-28 10:20:47 -05:00
import Immutable from 'immutable'
import {
POPOVER_OPEN,
POPOVER_CLOSE,
} from '../actions/popover'
const initialState = Immutable.Map({
popoverType: null,
placement: null,
})
export default function popoverMenu(state = initialState, action) {
switch (action.type) {
case POPOVER_OPEN:
return {
popoverType: action.popoverType,
2020-03-11 19:56:18 -04:00
popoverProps: action.popoverProps,
2020-02-28 10:20:47 -05:00
}
case POPOVER_CLOSE:
2020-03-14 13:31:29 -04:00
return initialState
2020-02-28 10:20:47 -05:00
default:
return state
}
}