ant-design/components/image/PreviewGroup.tsx

16 lines
549 B
TypeScript
Raw Normal View History

import * as React from 'react';
import RcImage from 'rc-image';
import { GroupConsumerValue } from 'rc-image/lib/PreviewGroup';
import { ConfigContext } from '../config-provider';
const InternalPreviewGroup: React.FC<GroupConsumerValue> = ({
previewPrefixCls: customizePrefixCls,
...props
}) => {
const { getPrefixCls } = React.useContext(ConfigContext);
const prefixCls = getPrefixCls('image-preview', customizePrefixCls);
return <RcImage.PreviewGroup previewPrefixCls={prefixCls} {...props} />;
};
export default InternalPreviewGroup;