ant-design/components/image/PreviewGroup.tsx
骗你是小猫咪 18c6d6fedb
feat: Image add PreviewGroup component to support multiple images preview (#28069)
* feat: Image add PreviewGroup component to support multiple images preview

* demo and PreviewGroup type

* add demo snapshot
2020-11-30 15:54:54 +08:00

16 lines
549 B
TypeScript

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;