1 | import PropTypes from 'prop-types';
|
2 | import React from 'react';
|
3 | import { StyleProp, ImageStyle, TextStyle } from 'react-native';
|
4 | import { User } from './Models';
|
5 | export interface GiftedAvatarProps {
|
6 | user?: User;
|
7 | avatarStyle?: StyleProp<ImageStyle>;
|
8 | textStyle?: StyleProp<TextStyle>;
|
9 | onPress?(props: any): void;
|
10 | onLongPress?(props: any): void;
|
11 | }
|
12 | export default class GiftedAvatar extends React.Component<GiftedAvatarProps> {
|
13 | static defaultProps: {
|
14 | user: {
|
15 | name: null;
|
16 | avatar: null;
|
17 | };
|
18 | onPress: undefined;
|
19 | onLongPress: undefined;
|
20 | avatarStyle: {};
|
21 | textStyle: {};
|
22 | };
|
23 | static propTypes: {
|
24 | user: PropTypes.Requireable<object>;
|
25 | onPress: PropTypes.Requireable<(...args: any[]) => any>;
|
26 | onLongPress: PropTypes.Requireable<(...args: any[]) => any>;
|
27 | avatarStyle: PropTypes.Requireable<number | boolean | object>;
|
28 | textStyle: PropTypes.Requireable<number | boolean | object>;
|
29 | };
|
30 | avatarName?: string;
|
31 | avatarColor?: string;
|
32 | setAvatarColor(): void;
|
33 | renderAvatar(): JSX.Element | null;
|
34 | renderInitials(): JSX.Element;
|
35 | handleOnPress: () => void;
|
36 | handleOnLongPress: () => void;
|
37 | render(): JSX.Element;
|
38 | }
|