|
|
@ -1,11 +1,11 @@ |
|
|
|
import * as React from 'react'; |
|
|
|
import { useContext } from 'react'; |
|
|
|
import EyeOutlined from '@ant-design/icons/EyeOutlined'; |
|
|
|
import RcImage, { ImageProps } from 'rc-image'; |
|
|
|
import defaultLocale from '../locale/en_US'; |
|
|
|
import PreviewGroup, { icons } from './PreviewGroup'; |
|
|
|
import * as React from 'react'; |
|
|
|
import { useContext } from 'react'; |
|
|
|
import { ConfigContext } from '../config-provider'; |
|
|
|
import defaultLocale from '../locale/en_US'; |
|
|
|
import { getTransitionName } from '../_util/motion'; |
|
|
|
import PreviewGroup, { icons } from './PreviewGroup'; |
|
|
|
|
|
|
|
export interface CompositionImage<P> extends React.FC<P> { |
|
|
|
PreviewGroup: typeof PreviewGroup; |
|
|
@ -16,11 +16,10 @@ const Image: CompositionImage<ImageProps> = ({ |
|
|
|
preview, |
|
|
|
...otherProps |
|
|
|
}) => { |
|
|
|
const { getPrefixCls } = useContext(ConfigContext); |
|
|
|
const { getPrefixCls, locale: contextLocale = defaultLocale } = useContext(ConfigContext); |
|
|
|
const prefixCls = getPrefixCls('image', customizePrefixCls); |
|
|
|
const rootPrefixCls = getPrefixCls(); |
|
|
|
|
|
|
|
const { locale: contextLocale = defaultLocale } = useContext(ConfigContext); |
|
|
|
const imageLocale = contextLocale.Image || defaultLocale.Image; |
|
|
|
|
|
|
|
const mergedPreview = React.useMemo(() => { |
|
|
|