1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-26 05:16:41 +07:00
vault-frontend/src/redux/modal/actions.ts
2019-08-02 17:17:09 +07:00

17 lines
467 B
TypeScript

import { IModalState } from '~/redux/modal/reducer';
import { MODAL_ACTIONS } from '~/redux/modal/constants';
export const modalSetShown = (is_shown: IModalState['is_shown']) => ({
is_shown,
type: MODAL_ACTIONS.SET_SHOWN,
});
export const modalSetDialog = (dialog: IModalState['dialog']) => ({
dialog,
type: MODAL_ACTIONS.SET_DIALOG,
});
export const modalShowDialog = (dialog: IModalState['dialog']) => ({
dialog,
type: MODAL_ACTIONS.SHOW_DIALOG,
});