UNPKG

1.12 kBTypeScriptView Raw
1import PropTypes from 'prop-types';
2import { Component } from 'react';
3import { ImageProps, ViewStyle, StyleProp, ImageStyle } from 'react-native';
4import { IMessage } from './Models';
5export interface MessageImageProps<TMessage extends IMessage> {
6 currentMessage?: TMessage;
7 containerStyle?: StyleProp<ViewStyle>;
8 imageStyle?: StyleProp<ImageStyle>;
9 imageProps?: Partial<ImageProps>;
10 lightboxProps?: object;
11}
12export default class MessageImage<TMessage extends IMessage = IMessage> extends Component<MessageImageProps<TMessage>> {
13 static defaultProps: {
14 currentMessage: {
15 image: null;
16 };
17 containerStyle: {};
18 imageStyle: {};
19 imageProps: {};
20 lightboxProps: {};
21 };
22 static propTypes: {
23 currentMessage: PropTypes.Requireable<object>;
24 containerStyle: PropTypes.Requireable<number | boolean | object>;
25 imageStyle: PropTypes.Requireable<number | boolean | object>;
26 imageProps: PropTypes.Requireable<object>;
27 lightboxProps: PropTypes.Requireable<object>;
28 };
29 render(): JSX.Element | null;
30}