UNPKG

@geneui/components

Version:

The Gene UI components library designed for BI tools

57 lines (56 loc) 1.5 kB
import { FC, MouseEvent } from 'react'; import './ImagePreview.scss'; interface IImagePreviewProps { /** * Image file display name */ name?: string; /** * Image path to display */ path: string; /** * Event fires when click on close button */ onClose?: (event: MouseEvent) => void; /** * Show image size */ showSize?: boolean; /** * Adding download functional for image */ showDownload?: boolean; /** * Adding rotation functional for image */ showRotate?: boolean; /** * Show dimensions of image */ showDimensions?: boolean; /** * Turning on magnifier functional */ withMagnifier?: boolean; /** * Show image in the modal */ withModal?: boolean; /** * Magnifier default value */ magnifierDefaultValue?: boolean; /** * This is for fetch image for example through this prop you can pass token. * Provide an Object that will spread in Request Headers:{...customHeaders} in second parameter for fetch function. * For example { 'Content-Type': 'application/json'} it will convert fetch(URL,{headers{'Content-Type': 'application/json'}}) */ customHeaders?: HeadersInit; /** * The prop is responsible for header view and alignment for mobile device */ isMobile?: boolean; } declare const ImagePreview: FC<IImagePreviewProps>; export { IImagePreviewProps, ImagePreview as default };