diff --git a/src/components/FullscreenImage/FullscreenImage.tsx b/src/components/FullscreenImage/FullscreenImage.tsx index 33e73023c..a17680895 100644 --- a/src/components/FullscreenImage/FullscreenImage.tsx +++ b/src/components/FullscreenImage/FullscreenImage.tsx @@ -10,7 +10,7 @@ import i18n from './i18n'; import './FullscreenImage.scss'; -export interface FullscreenImageProps extends ImageProps { +export interface FullscreenImageProps extends Omit { imageClassName?: string; modalImageClass?: string; imageStyle?: CSSProperties; @@ -22,7 +22,8 @@ const FULL_SCREEN_ICON_SIZE = 18; const CLOSE_ICON_SIZE = 30; const FullscreenImage = (props: FullscreenImageProps) => { - const {imageClassName, modalImageClass, imageStyle, alt = i18n('img-alt'), extraProps} = props; + const {imageClassName, modalImageClass, imageStyle, alt = i18n('img-alt')} = props; + const {extraProps, ...imageProps} = props; const [isOpened, setIsOpened] = useState(false); const openModal = () => setIsOpened(true); @@ -32,7 +33,7 @@ const FullscreenImage = (props: FullscreenImageProps) => {
{alt} { className={b('icon', {hover: true})} /> - +
)}