UNPKG

2.18 kBTypeScriptView Raw
1import React from 'react';
2import { StyleProp, ViewStyle, TextStyle, ImageSourcePropType, ImageStyle } from 'react-native';
3import { RneFunctionComponent } from '../helpers';
4import { IconObject } from '../icons/Icon';
5import { ImageProps } from '../image/Image';
6interface AvatarIcon extends IconObject {
7 iconStyle?: StyleProp<TextStyle>;
8}
9export declare type AvatarProps = {
10 Component?: typeof React.Component;
11 onPress?(): void;
12 onLongPress?(): void;
13 containerStyle?: StyleProp<ViewStyle>;
14 source?: ImageSourcePropType;
15 avatarStyle?: ImageStyle;
16 rounded?: boolean;
17 title?: string;
18 titleStyle?: StyleProp<TextStyle>;
19 overlayContainerStyle?: StyleProp<TextStyle>;
20 activeOpacity?: number;
21 icon?: AvatarIcon;
22 iconStyle?: StyleProp<TextStyle>;
23 size?: ('small' | 'medium' | 'large' | 'xlarge') | number;
24 placeholderStyle?: StyleProp<ViewStyle>;
25 renderPlaceholderContent?: React.ReactElement<{}>;
26 imageProps?: Partial<ImageProps>;
27 ImageComponent?: React.ComponentClass;
28};
29interface Avatar extends RneFunctionComponent<AvatarProps> {
30}
31declare const Avatar: React.NamedExoticComponent<AvatarProps & Partial<import("../config").ThemeProps<AvatarProps>>>;
32export { Avatar };
33declare const ThemedAvatar: (React.FunctionComponent<Omit<AvatarProps & Partial<import("../config").ThemeProps<AvatarProps>>, keyof import("../config").ThemeProps<T>>> | React.ForwardRefExoticComponent<AvatarProps & Partial<import("../config").ThemeProps<AvatarProps>>>) & {
34 Accessory: React.FunctionComponent<Omit<Partial<import("../icons/Icon").IconProps> & Partial<ImageProps> & {
35 underlayColor?: import("react-native").ColorValue;
36 style?: StyleProp<ViewStyle>;
37 } & Partial<import("../config").ThemeProps<import("./Accessory").AccessoryProps>>, keyof import("../config").ThemeProps<T>>> | React.ForwardRefExoticComponent<Partial<import("../icons/Icon").IconProps> & Partial<ImageProps> & {
38 underlayColor?: import("react-native").ColorValue;
39 style?: StyleProp<ViewStyle>;
40 } & Partial<import("../config").ThemeProps<import("./Accessory").AccessoryProps>>>;
41};
42export default ThemedAvatar;