mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
added layload offset for flow cell image
This commit is contained in:
parent
ef669cab51
commit
93a1d4104b
2 changed files with 4 additions and 5 deletions
|
@ -1,15 +1,13 @@
|
|||
import React, { FC, useState } from 'react';
|
||||
import React, { FC } from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { CellShade } from '~/components/flow/CellShade';
|
||||
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 classNames from 'classnames';
|
||||
import { FlowCellMenu } from '~/components/flow/FlowCellMenu';
|
||||
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 { MenuDots } from '~/components/common/MenuDots';
|
||||
|
||||
|
@ -19,6 +17,7 @@ interface Props {
|
|||
title: string;
|
||||
image?: string;
|
||||
color?: string;
|
||||
|
||||
text?: string;
|
||||
flow: FlowDisplay;
|
||||
canEdit?: boolean;
|
||||
|
|
|
@ -9,7 +9,7 @@ interface Props extends IMGProps {
|
|||
}
|
||||
|
||||
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="" />
|
||||
{children}
|
||||
</LazyLoad>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue