1 | import PropTypes from 'prop-types';
|
2 | import { Component } from 'react';
|
3 | import { ViewStyle, TextStyle } from 'react-native';
|
4 | import { LeftRightStyle, IMessage } from './Models';
|
5 | export interface TimeProps<TMessage extends IMessage> {
|
6 | position: 'left' | 'right';
|
7 | currentMessage?: TMessage;
|
8 | containerStyle?: LeftRightStyle<ViewStyle>;
|
9 | timeTextStyle?: LeftRightStyle<TextStyle>;
|
10 | timeFormat?: string;
|
11 | }
|
12 | export default class Time<TMessage extends IMessage = IMessage> extends Component<TimeProps<TMessage>> {
|
13 | static contextTypes: {
|
14 | getLocale: PropTypes.Requireable<(...args: any[]) => any>;
|
15 | };
|
16 | static defaultProps: {
|
17 | position: string;
|
18 | currentMessage: {
|
19 | createdAt: null;
|
20 | };
|
21 | containerStyle: {};
|
22 | timeFormat: string;
|
23 | timeTextStyle: {};
|
24 | };
|
25 | static propTypes: {
|
26 | position: PropTypes.Requireable<string>;
|
27 | currentMessage: PropTypes.Requireable<object>;
|
28 | containerStyle: PropTypes.Requireable<PropTypes.InferProps<{
|
29 | left: PropTypes.Requireable<number | boolean | object>;
|
30 | right: PropTypes.Requireable<number | boolean | object>;
|
31 | }>>;
|
32 | timeFormat: PropTypes.Requireable<string>;
|
33 | timeTextStyle: PropTypes.Requireable<PropTypes.InferProps<{
|
34 | left: PropTypes.Requireable<number | boolean | object>;
|
35 | right: PropTypes.Requireable<number | boolean | object>;
|
36 | }>>;
|
37 | };
|
38 | render(): JSX.Element | null;
|
39 | }
|