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

ignoring image modal key sliding when modal is shown

This commit is contained in:
Fedor Katurov 2020-06-05 17:24:42 +07:00
parent e25caef8a3
commit 924b6d4285
7 changed files with 54 additions and 55 deletions

View file

@ -76,24 +76,22 @@ export const NODE_TYPES = {
TEXT: 'text',
};
type INodeComponents = Record<
ValueOf<typeof NODE_TYPES>,
FC<{
node: INode;
is_loading: boolean;
layout: {};
updateLayout: () => void;
modalShowPhotoswipe: typeof modalShowPhotoswipe;
}>
>;
export type INodeComponentProps = {
node: INode;
is_loading: boolean;
is_modal_shown: boolean;
layout: {};
updateLayout: () => void;
modalShowPhotoswipe: typeof modalShowPhotoswipe;
};
export type INodeComponents = Record<ValueOf<typeof NODE_TYPES>, FC<INodeComponentProps>>;
export const NODE_HEADS: INodeComponents = {
// [NODE_TYPES.IMAGE]: NodeImageBlock,
[NODE_TYPES.IMAGE]: NodeImageSlideBlock,
};
export const NODE_COMPONENTS: INodeComponents = {
// [NODE_TYPES.IMAGE]: NodeImageSlideBlock,
[NODE_TYPES.VIDEO]: NodeVideoBlock,
[NODE_TYPES.AUDIO]: NodeAudioImageBlock,
};