@wix/design-system
Version:
@wix/design-system
51 lines (48 loc) • 1.42 kB
TypeScript
import * as React from 'react';
import { InputProps } from '../Input';
import { ImageProps } from '../Image';
import { TooltipCommonProps } from '../common';
export interface ImageViewerProps {
imageUrl?: string;
fit?: 'cover' | 'contain';
error?: boolean;
errorMessage?: string;
tooltipProps?: TooltipCommonProps;
showUpdateButton?: boolean;
showDownloadButton?: boolean;
showRemoveButton?: boolean;
onAddImage?: React.MouseEventHandler<HTMLElement>;
onUpdateImage?: React.MouseEventHandler<HTMLElement>;
onDownloadImage?: React.MouseEventHandler<HTMLElement>;
onRemoveImage?: React.MouseEventHandler<HTMLElement>;
onImageLoad?: React.ReactEventHandler<HTMLImageElement>;
addImageInfo?: string;
updateImageInfo?: string;
downloadImageInfo?: string;
removeImageInfo?: string;
moreImageInfo?: string;
removeRoundedBorders?: boolean;
width?: number | string;
height?: number | string;
disabled?: boolean;
status?: InputProps['status'];
statusMessage?: InputProps['statusMessage'];
dataHook?: string;
className?: string;
imageProps?: Pick<
ImageProps,
| 'alt'
| 'borderRadius'
| 'height'
| 'position'
| 'showBorder'
| 'style'
| 'transparent'
| 'width'
>;
updateButtonAriaLabel?: string;
removeButtonAriaLabel?: string;
}
export default class ImageViewer extends React.Component<ImageViewerProps> {
focus: () => void;
}