1 | import * as React from 'react';
|
2 | import { ImageSourcePropType, ImageProps, View, ViewStyle, StyleProp } from 'react-native';
|
3 | export declare type AvatarImageSource = ImageSourcePropType | ((props: {
|
4 | size: number;
|
5 | }) => React.ReactNode);
|
6 | declare type Props = React.ComponentPropsWithRef<typeof View> & {
|
7 | |
8 |
|
9 |
|
10 |
|
11 |
|
12 | source: AvatarImageSource;
|
13 | |
14 |
|
15 |
|
16 | size?: number;
|
17 | style?: StyleProp<ViewStyle>;
|
18 | |
19 |
|
20 |
|
21 | onError?: ImageProps['onError'];
|
22 | |
23 |
|
24 |
|
25 | onLayout?: ImageProps['onLayout'];
|
26 | |
27 |
|
28 |
|
29 | onLoad?: ImageProps['onLoad'];
|
30 | |
31 |
|
32 |
|
33 | onLoadEnd?: ImageProps['onLoadEnd'];
|
34 | |
35 |
|
36 |
|
37 | onLoadStart?: ImageProps['onLoadStart'];
|
38 | |
39 |
|
40 |
|
41 | onProgress?: ImageProps['onProgress'];
|
42 | |
43 |
|
44 |
|
45 | theme: ReactNativePaper.Theme;
|
46 | };
|
47 | declare const _default: React.ComponentType<Pick<import("react-native").ViewProps & React.RefAttributes<View> & {
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 | source: AvatarImageSource;
|
54 | |
55 |
|
56 |
|
57 | size?: number | undefined;
|
58 | style?: StyleProp<ViewStyle>;
|
59 | |
60 |
|
61 |
|
62 | onError?: ((error: import("react-native").NativeSyntheticEvent<import("react-native").ImageErrorEventData>) => void) | undefined;
|
63 | /**
|
64 | * Invoked on mount and on layout changes.
|
65 | */
|
66 | onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
67 | /**
|
68 | * Invoked when load completes successfully.
|
69 | */
|
70 | onLoad?: ((event: import("react-native").NativeSyntheticEvent<import("react-native").ImageLoadEventData>) => void) | undefined;
|
71 | /**
|
72 | * Invoked when load either succeeds or fails.
|
73 | */
|
74 | onLoadEnd?: (() => void) | undefined;
|
75 | /**
|
76 | * Invoked on load start.
|
77 | */
|
78 | onLoadStart?: (() => void) | undefined;
|
79 | /**
|
80 | * Invoked on download progress.
|
81 | */
|
82 | onProgress?: ((event: import("react-native").NativeSyntheticEvent<import("react-native").ImageProgressEventDataIOS>) => void) | undefined;
|
83 | /**
|
84 | * @optional
|
85 | */
|
86 | theme: ReactNativePaper.Theme;
|
87 | }, "source" | "size" | keyof import("react-native").ViewProps | "onError" | "onLoad" | "onLoadEnd" | "onLoadStart" | "onProgress" | keyof React.RefAttributes<View>> & {
|
88 | theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
89 | }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").ViewProps & React.RefAttributes<View> & {
|
90 | /**
|
91 | * Image to display for the `Avatar`.
|
92 | * It accepts a standard React Native Image `source` prop
|
93 | * Or a function that returns an `Image`.
|
94 | */
|
95 | source: AvatarImageSource;
|
96 | /**
|
97 | * Size of the avatar.
|
98 | */
|
99 | size?: number | undefined;
|
100 | style?: StyleProp<ViewStyle>;
|
101 | /**
|
102 | * Invoked on load error.
|
103 | */
|
104 | onError?: ((error: import("react-native").NativeSyntheticEvent<import("react-native").ImageErrorEventData>) => void) | undefined;
|
105 | /**
|
106 | * Invoked on mount and on layout changes.
|
107 | */
|
108 | onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
109 | /**
|
110 | * Invoked when load completes successfully.
|
111 | */
|
112 | onLoad?: ((event: import("react-native").NativeSyntheticEvent<import("react-native").ImageLoadEventData>) => void) | undefined;
|
113 | /**
|
114 | * Invoked when load either succeeds or fails.
|
115 | */
|
116 | onLoadEnd?: (() => void) | undefined;
|
117 | /**
|
118 | * Invoked on load start.
|
119 | */
|
120 | onLoadStart?: (() => void) | undefined;
|
121 | /**
|
122 | * Invoked on download progress.
|
123 | */
|
124 | onProgress?: ((event: import("react-native").NativeSyntheticEvent<import("react-native").ImageProgressEventDataIOS>) => void) | undefined;
|
125 | /**
|
126 | * @optional
|
127 | */
|
128 | theme: ReactNativePaper.Theme;
|
129 | }> & {
|
130 | ({ size, source, style, onError, onLayout, onLoad, onLoadEnd, onLoadStart, onProgress, theme, ...rest }: Props): JSX.Element;
|
131 | displayName: string;
|
132 | }, {}>;
|
133 | export default _default;
|
134 |
|
\ | No newline at end of file |