2020-01-18 02:07:52 +05:30
|
|
|
import { Action as ReduxPopup } from 'redux';
|
2019-12-07 16:58:52 +05:30
|
|
|
import { PopupConfig } from './reducer';
|
|
|
|
|
2020-01-18 02:07:52 +05:30
|
|
|
interface PopupCreateAction extends ReduxPopup {
|
2020-05-24 04:38:24 +05:30
|
|
|
type: 'POPUP_CREATE';
|
|
|
|
payload: PopupConfig;
|
2020-01-18 02:07:52 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
export function create(popup: PopupConfig): PopupCreateAction {
|
2020-05-24 04:38:24 +05:30
|
|
|
return {
|
|
|
|
type: 'POPUP_CREATE',
|
|
|
|
payload: popup,
|
|
|
|
};
|
2019-12-07 16:58:52 +05:30
|
|
|
}
|
|
|
|
|
2020-01-18 02:07:52 +05:30
|
|
|
interface PopupDestroyAction extends ReduxPopup {
|
2020-05-24 04:38:24 +05:30
|
|
|
type: 'POPUP_DESTROY';
|
|
|
|
payload: PopupConfig;
|
2020-01-18 02:07:52 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
export function destroy(popup: PopupConfig): PopupDestroyAction {
|
2020-05-24 04:38:24 +05:30
|
|
|
return {
|
|
|
|
type: 'POPUP_DESTROY',
|
|
|
|
payload: popup,
|
|
|
|
};
|
2019-12-07 16:58:52 +05:30
|
|
|
}
|
2020-01-18 02:07:52 +05:30
|
|
|
|
|
|
|
export type Action = PopupCreateAction | PopupDestroyAction;
|