@douyinfe/semi-ui
Version:
A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.
39 lines (38 loc) • 1.78 kB
TypeScript
import React from "react";
import BaseComponent from "../_base/baseComponent";
import { PreviewImageProps, PreviewImageStates } from "./interface";
import PropTypes from "prop-types";
import PreviewImageFoundation, { PreviewImageAdapter } from '@douyinfe/semi-foundation/lib/cjs/image/previewImageFoundation';
export default class PreviewImage extends BaseComponent<PreviewImageProps, PreviewImageStates> {
static propTypes: {
src: PropTypes.Requireable<string>;
rotation: PropTypes.Requireable<number>;
style: PropTypes.Requireable<object>;
zoom: PropTypes.Requireable<number>;
ratio: PropTypes.Requireable<string>;
disableDownload: PropTypes.Requireable<boolean>;
clickZoom: PropTypes.Requireable<number>;
setRatio: PropTypes.Requireable<(...args: any[]) => any>;
onZoom: PropTypes.Requireable<(...args: any[]) => any>;
onLoad: PropTypes.Requireable<(...args: any[]) => any>;
onError: PropTypes.Requireable<(...args: any[]) => any>;
};
static defaultProps: {
zoom: any;
};
get adapter(): PreviewImageAdapter<PreviewImageProps, PreviewImageStates>;
containerRef: React.RefObject<HTMLDivElement>;
imageRef: React.RefObject<HTMLImageElement>;
foundation: PreviewImageFoundation;
constructor(props: any);
componentDidMount(): void;
componentWillUnmount(): void;
componentDidUpdate(prevProps: PreviewImageProps, prevStates: PreviewImageStates): void;
onWindowResize: () => void;
handleRightClickImage: (e: any) => void;
handleLoad: (e: any) => void;
handleError: (e: any) => void;
handleImageMove: (e: any) => void;
handleMouseDown: (e: React.MouseEvent<HTMLImageElement>) => void;
render(): React.JSX.Element;
}