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

added layload offset for flow cell image

This commit is contained in:
Fedor Katurov 2021-11-06 18:13:43 +07:00
parent ef669cab51
commit 93a1d4104b
2 changed files with 4 additions and 5 deletions

View file

@ -1,15 +1,13 @@
import React, { FC, useState } from 'react'; import React, { FC } from 'react';
import styles from './styles.module.scss'; import styles from './styles.module.scss';
import { NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import { CellShade } from '~/components/flow/CellShade'; import { CellShade } from '~/components/flow/CellShade';
import { FlowCellImage } from '~/components/flow/FlowCellImage'; import { FlowCellImage } from '~/components/flow/FlowCellImage';
import { FlowDisplay, FlowDisplayVariant, INode } from '~/redux/types'; import { FlowDisplay, INode } from '~/redux/types';
import { FlowCellText } from '~/components/flow/FlowCellText'; import { FlowCellText } from '~/components/flow/FlowCellText';
import classNames from 'classnames'; import classNames from 'classnames';
import { FlowCellMenu } from '~/components/flow/FlowCellMenu'; import { FlowCellMenu } from '~/components/flow/FlowCellMenu';
import { useFlowCellControls } from '~/utils/hooks/flow/useFlowCellControls'; import { useFlowCellControls } from '~/utils/hooks/flow/useFlowCellControls';
import { Icon } from '~/components/input/Icon';
import { useFocusEvent } from '~/utils/hooks/useFocusEvent';
import { useClickOutsideFocus } from '~/utils/hooks/useClickOutsideFocus'; import { useClickOutsideFocus } from '~/utils/hooks/useClickOutsideFocus';
import { MenuDots } from '~/components/common/MenuDots'; import { MenuDots } from '~/components/common/MenuDots';
@ -19,6 +17,7 @@ interface Props {
title: string; title: string;
image?: string; image?: string;
color?: string; color?: string;
text?: string; text?: string;
flow: FlowDisplay; flow: FlowDisplay;
canEdit?: boolean; canEdit?: boolean;

View file

@ -9,7 +9,7 @@ interface Props extends IMGProps {
} }
const FlowCellImage: FC<Props> = ({ className, children, ...rest }) => ( const FlowCellImage: FC<Props> = ({ className, children, ...rest }) => (
<LazyLoad once className={classNames(styles.wrapper, className)}> <LazyLoad once offset={600} className={classNames(styles.wrapper, className)}>
<img {...rest} src={rest.src} alt="" /> <img {...rest} src={rest.src} alt="" />
{children} {children}
</LazyLoad> </LazyLoad>