1 | import React from 'react';
|
2 | import { StyleProp, ViewStyle, TextStyle, ImageSourcePropType, ImageStyle } from 'react-native';
|
3 | import { RneFunctionComponent } from '../helpers';
|
4 | import { IconObject } from '../icons/Icon';
|
5 | import { ImageProps } from '../image/Image';
|
6 | interface AvatarIcon extends IconObject {
|
7 | iconStyle?: StyleProp<TextStyle>;
|
8 | }
|
9 | export 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 | };
|
29 | interface Avatar extends RneFunctionComponent<AvatarProps> {
|
30 | }
|
31 | declare const Avatar: React.NamedExoticComponent<AvatarProps & Partial<import("../config").ThemeProps<AvatarProps>>>;
|
32 | export { Avatar };
|
33 | declare const ThemedAvatar: (React.FunctionComponent<Pick<AvatarProps & Partial<import("../config").ThemeProps<AvatarProps>>, "source" | "iconStyle" | "size" | "onPress" | "onLongPress" | "activeOpacity" | "Component" | "containerStyle" | "title" | "ImageComponent" | "placeholderStyle" | "icon" | "avatarStyle" | "rounded" | "titleStyle" | "overlayContainerStyle" | "imageProps" | "renderPlaceholderContent">> & {
|
34 | Accessory: React.FunctionComponent<Pick<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>>, "style" | "onLayout" | "onError" | "onLoad" | "onLoadEnd" | "onLoadStart" | "progressiveRenderingEnabled" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "resizeMode" | "resizeMethod" | "source" | "loadingIndicatorSource" | "testID" | "defaultSource" | "blurRadius" | "capInsets" | "onProgress" | "onPartialLoad" | "fadeDuration" | "width" | "height" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "raised" | "disabled" | "color" | "iconStyle" | "backgroundColor" | "size" | "name" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onTextLayout" | "onPress" | "onLongPress" | "nativeID" | "maxFontSizeMultiplier" | "adjustsFontSizeToFit" | "minimumFontScale" | "suppressHighlighting" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "activeOpacity" | "onHideUnderlay" | "onShowUnderlay" | "underlayColor" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "hitSlop" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "hasTVPreferredFocus" | "tvParallaxProperties" | "touchSoundDisabled" | "background" | "useForeground" | "type" | "Component" | "reverse" | "containerStyle" | "iconProps" | "reverseColor" | "disabledStyle" | "solid" | "brand" | "ImageComponent" | "PlaceholderContent" | "childrenContainerStyle" | "placeholderStyle" | "transition" | "transitionDuration">> | 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 | }) | (React.ForwardRefExoticComponent<AvatarProps & Partial<import("../config").ThemeProps<AvatarProps>>> & {
|
42 | Accessory: React.FunctionComponent<Pick<Partial<import("../icons/Icon").IconProps> & Partial<ImageProps> & {
|
43 | underlayColor?: import("react-native").ColorValue;
|
44 | style?: StyleProp<ViewStyle>;
|
45 | } & Partial<import("../config").ThemeProps<import("./Accessory").AccessoryProps>>, "style" | "onLayout" | "onError" | "onLoad" | "onLoadEnd" | "onLoadStart" | "progressiveRenderingEnabled" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "resizeMode" | "resizeMethod" | "source" | "loadingIndicatorSource" | "testID" | "defaultSource" | "blurRadius" | "capInsets" | "onProgress" | "onPartialLoad" | "fadeDuration" | "width" | "height" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "raised" | "disabled" | "color" | "iconStyle" | "backgroundColor" | "size" | "name" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onTextLayout" | "onPress" | "onLongPress" | "nativeID" | "maxFontSizeMultiplier" | "adjustsFontSizeToFit" | "minimumFontScale" | "suppressHighlighting" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "activeOpacity" | "onHideUnderlay" | "onShowUnderlay" | "underlayColor" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "hitSlop" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "hasTVPreferredFocus" | "tvParallaxProperties" | "touchSoundDisabled" | "background" | "useForeground" | "type" | "Component" | "reverse" | "containerStyle" | "iconProps" | "reverseColor" | "disabledStyle" | "solid" | "brand" | "ImageComponent" | "PlaceholderContent" | "childrenContainerStyle" | "placeholderStyle" | "transition" | "transitionDuration">> | React.ForwardRefExoticComponent<Partial<import("../icons/Icon").IconProps> & Partial<ImageProps> & {
|
46 | underlayColor?: import("react-native").ColorValue;
|
47 | style?: StyleProp<ViewStyle>;
|
48 | } & Partial<import("../config").ThemeProps<import("./Accessory").AccessoryProps>>>;
|
49 | });
|
50 | export default ThemedAvatar;
|