UNPKG

1.51 kBTypeScriptView Raw
1import PropTypes from 'prop-types';
2import { PureComponent } from 'react';
3import { StyleProp, ViewStyle, TextStyle } from 'react-native';
4import { IMessage } from './Models';
5export interface DayProps<TMessage extends IMessage> {
6 currentMessage?: TMessage;
7 nextMessage?: TMessage;
8 previousMessage?: TMessage;
9 containerStyle?: StyleProp<ViewStyle>;
10 wrapperStyle?: StyleProp<ViewStyle>;
11 textStyle?: StyleProp<TextStyle>;
12 dateFormat?: string;
13 inverted?: boolean;
14}
15export default class Day<TMessage extends IMessage = IMessage> extends PureComponent<DayProps<TMessage>> {
16 static contextTypes: {
17 getLocale: PropTypes.Requireable<(...args: any[]) => any>;
18 };
19 static defaultProps: {
20 currentMessage: {
21 createdAt: null;
22 };
23 previousMessage: {};
24 nextMessage: {};
25 containerStyle: {};
26 wrapperStyle: {};
27 textStyle: {};
28 dateFormat: string;
29 };
30 static propTypes: {
31 currentMessage: PropTypes.Requireable<object>;
32 previousMessage: PropTypes.Requireable<object>;
33 nextMessage: PropTypes.Requireable<object>;
34 inverted: PropTypes.Requireable<boolean>;
35 containerStyle: PropTypes.Requireable<number | boolean | object>;
36 wrapperStyle: PropTypes.Requireable<number | boolean | object>;
37 textStyle: PropTypes.Requireable<number | boolean | object>;
38 dateFormat: PropTypes.Requireable<string>;
39 };
40 render(): JSX.Element | null;
41}