1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

sagas for node creation dialog

This commit is contained in:
Fedor Katurov 2019-10-16 16:22:01 +07:00
parent 265b075ddc
commit 1b6a81d27c
11 changed files with 119 additions and 22 deletions

View file

@ -1,6 +1,8 @@
import { ValueOf } from '~/redux/types';
import { EditorDialogImage } from '~/containers/editors/EditorDialogImage';
import { LoginDialog } from '~/containers/dialogs/LoginDialog';
import { EditorDialogImage } from '~/containers/editors/EditorDialogImage';
import { EditorDialogText } from '~/containers/editors/EditorDialogText';
import { NODE_TYPES } from '../node/constants';
export const MODAL_ACTIONS = {
SET_SHOWN: 'MODAL.SET_SHOWN',
@ -10,14 +12,21 @@ export const MODAL_ACTIONS = {
export const DIALOGS = {
EDITOR_IMAGE: 'EDITOR_IMAGE',
EDITOR_TEXT: 'EDITOR_TEXT',
LOGIN: 'LOGIN',
};
export const DIALOG_CONTENT = {
[DIALOGS.EDITOR_IMAGE]: EditorDialogImage,
[DIALOGS.EDITOR_TEXT]: EditorDialogText,
[DIALOGS.LOGIN]: LoginDialog,
};
export const NODE_EDITOR_DIALOGS = {
[NODE_TYPES.IMAGE]: DIALOGS.EDITOR_IMAGE,
[NODE_TYPES.TEXT]: DIALOGS.EDITOR_TEXT,
};
export interface IDialogProps {
onRequestClose: () => void;
onDialogChange: (dialog: ValueOf<typeof DIALOGS>) => void;