MCPcopy Create free account
hub / github.com/DTStack/dt-react-component / NormalImage

Function NormalImage

src/image/index.tsx:68–74  ·  view source on GitHub ↗
(props: IProps)

Source from the content-addressed store, hash-verified

66};
67
68const NormalImage = (props: IProps) => {
69 const { src: originSrc, className, style, loader = <Spin spinning />, ...rest } = props;
70 const { src, isLoading } = useImage({ src: originSrc });
71 if (src) return <img {...rest} className={className} style={style} src={src} />;
72 if (isLoading) return loader;
73 return null;
74};
75
76export default ImageComponent;

Callers

nothing calls this directly

Calls 1

useImageFunction · 0.85

Tested by

no test coverage detected