mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 13:37:52 +08:00
13 lines
435 B
TypeScript
13 lines
435 B
TypeScript
import * as React from 'react';
|
|
import RcImage, { ImageProps } from 'rc-image';
|
|
import { ConfigContext } from '../config-provider';
|
|
|
|
const Image: React.FC<ImageProps> = ({ prefixCls: customizePrefixCls, ...otherProps }) => {
|
|
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
const prefixCls = getPrefixCls('image', customizePrefixCls);
|
|
|
|
return <RcImage prefixCls={prefixCls} {...otherProps} />;
|
|
};
|
|
|
|
export default Image;
|