Skip to content

Commit

Permalink
fix image preview icon missing
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jan 6, 2021
1 parent aac993a commit 6113434
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import cn from 'classnames';
import { getOffset } from 'rc-util/lib/Dom/css';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import { GetContainer } from 'rc-util/lib/PortalWrapper';
import Preview from './Preview';
import Preview, { PreviewProps } from './Preview';
import PreviewGroup, { context } from './PreviewGroup';

export interface ImagePreviewType {
Expand All @@ -14,6 +14,7 @@ export interface ImagePreviewType {
getContainer?: GetContainer | false;
mask?: React.ReactNode;
maskClassName?: string;
icons?: PreviewProps['icons'];
}

let uuid = 0;
Expand Down Expand Up @@ -77,6 +78,7 @@ const ImageInternal: CompoundedComponent<ImageProps> = ({
getContainer: getPreviewContainer = undefined,
mask: previewMask,
maskClassName,
icons,
}: ImagePreviewType = typeof preview === 'object' ? preview : {};
const src = previewSrc ?? imgSrc;
const isControlled = previewVisible !== undefined;
Expand Down Expand Up @@ -234,6 +236,7 @@ const ImageInternal: CompoundedComponent<ImageProps> = ({
src={mergedSrc}
alt={alt}
getContainer={getPreviewContainer}
icons={icons}
/>
)}
</>
Expand Down

1 comment on commit 6113434

@vercel
Copy link

@vercel vercel bot commented on 6113434 Jan 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.