This repository was archived by the owner on Aug 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTime.d.ts
39 lines (39 loc) · 1.47 KB
/
Time.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import PropTypes from 'prop-types';
import { Component } from 'react';
import { ViewStyle, TextStyle } from 'react-native';
import { LeftRightStyle, IMessage } from './types';
export interface TimeProps<TMessage extends IMessage> {
position: 'left' | 'right';
currentMessage?: TMessage;
containerStyle?: LeftRightStyle<ViewStyle>;
timeTextStyle?: LeftRightStyle<TextStyle>;
timeFormat?: string;
}
export default class Time<TMessage extends IMessage = IMessage> extends Component<TimeProps<TMessage>> {
static contextTypes: {
getLocale: PropTypes.Requireable<(...args: any[]) => any>;
};
static defaultProps: {
position: string;
currentMessage: {
createdAt: null;
};
containerStyle: {};
timeFormat: string;
timeTextStyle: {};
};
static propTypes: {
position: PropTypes.Requireable<string>;
currentMessage: PropTypes.Requireable<object>;
containerStyle: PropTypes.Requireable<PropTypes.InferProps<{
left: PropTypes.Validator<import("react-native").StyleProp<ViewStyle>> | undefined;
right: PropTypes.Validator<import("react-native").StyleProp<ViewStyle>> | undefined;
}>>;
timeFormat: PropTypes.Requireable<string>;
timeTextStyle: PropTypes.Requireable<PropTypes.InferProps<{
left: PropTypes.Requireable<any>;
right: PropTypes.Requireable<any>;
}>>;
};
render(): JSX.Element | null;
}