@wix/design-system
Version:
@wix/design-system
64 lines • 2.32 kB
TypeScript
export default ImageViewer;
declare class ImageViewer extends React.Component<any, any, any> {
static contextType: React.Context<import("../FormField/StatusContext").StatusContextProps>;
constructor(props: any);
focusNode: React.RefObject<any>;
state: {
imageLoading: boolean;
previousImageUrl: undefined;
popoverOpen: boolean;
};
UNSAFE_componentWillReceiveProps(nextProps: any): void;
_renderAddImage: () => React.JSX.Element;
/** `display: none` is used to prefetch an image == it fetches the image but doesn't show it */
_renderImageElement: ({ imageUrl, shouldDisplay, onLoad, onError, key, dataHook, fit, }: {
imageUrl: any;
shouldDisplay: any;
onLoad: any;
onError: any;
key: any;
dataHook: any;
fit: any;
}) => React.JSX.Element;
_resetImageLoading: () => void;
_onImageLoad: (e: any) => void;
_getCurrentAndPreviousImages: () => {
currentImageUrl: any;
previousImageUrl: undefined;
};
_renderImage: () => React.JSX.Element | undefined;
_renderUpdateButton: (ref: any) => React.JSX.Element;
_resetPreviousImage: () => void;
_renderRemoveButton: (ref: any) => React.JSX.Element;
_renderDownloadButton: (ref: any) => React.JSX.Element;
_hidePopover: () => void;
_showPopover: () => void;
_renderMoreButton: () => React.JSX.Element;
_renderFirstButton: () => React.JSX.Element | null;
_renderSecondButton: () => React.JSX.Element | null;
_renderLoader: () => React.JSX.Element;
_renderButtons: () => React.JSX.Element;
_renderOverlayWith: (content: any) => React.JSX.Element;
/**
* Sets focus on the element
*/
focus: () => void;
render(): React.JSX.Element;
}
declare namespace ImageViewer {
let displayName: string;
namespace defaultProps {
let showUpdateButton: boolean;
let showDownloadButton: boolean;
let showRemoveButton: boolean;
let fit: string;
let addImageInfo: string;
let updateImageInfo: string;
let downloadImageInfo: string;
let removeImageInfo: string;
let moreImageInfo: string;
function onImageLoad(): {};
}
}
import React from 'react';
//# sourceMappingURL=ImageViewer.d.ts.map