mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 21:59:41 +08:00
13 lines
477 B
TypeScript
13 lines
477 B
TypeScript
|
import * as React from 'react';
|
||
|
import RcImage, { ImageProps } from 'rc-image';
|
||
|
import { ConfigConsumerProps, ConfigContext } from '../config-provider';
|
||
|
|
||
|
const Image: React.FC<ImageProps> = ({ prefixCls: customizePrefixCls, ...otherProps }) => {
|
||
|
const { getPrefixCls }: ConfigConsumerProps = React.useContext(ConfigContext);
|
||
|
const prefixCls = getPrefixCls('image', customizePrefixCls);
|
||
|
|
||
|
return <RcImage prefixCls={prefixCls} {...otherProps} />;
|
||
|
};
|
||
|
|
||
|
export default Image;
|