easemob-chat-uikit
Version:
   ![GitHub last c
34 lines (33 loc) • 1.25 kB
TypeScript
import React from 'react';
import { BaseMessageProps, renderUserProfileProps } from '../baseMessage';
import type { ImageMessageType } from '../types/messageType';
export interface ImageMessageProps extends BaseMessageProps {
imageMessage: ImageMessageType;
prefix?: string;
style?: React.CSSProperties;
className?: string;
bubbleClass?: string;
type?: 'primary' | 'secondly';
onClickImage?: (url: string) => void;
nickName?: string;
renderUserProfile?: (props: renderUserProfileProps) => React.ReactNode;
imgProps?: React.ImgHTMLAttributes<HTMLImageElement>;
/** 自定义图片预览组件,用于替换默认的预览弹窗 */
renderImagePreview?: (props: {
visible: boolean;
imageUrl: string;
onClose: () => void;
message: ImageMessageType;
}) => React.ReactNode;
}
export interface ImagePreviewProps {
visible: boolean;
previewImageUrl: string;
alt?: string;
onCancel?: () => void;
}
export declare const ImagePreview: (props: ImagePreviewProps) => import("react/jsx-runtime").JSX.Element;
declare const _default: ((props: ImageMessageProps) => import("react/jsx-runtime").JSX.Element) & {
displayName: string;
};
export default _default;