1
1
import React , { PureComponent } from 'react' ;
2
- import { ImageSourcePropType , StyleProp , ViewStyle , ImagePropsBase , ImageStyle , TextStyle } from 'react-native' ;
2
+ import { ImageSourcePropType , StyleProp , ViewStyle , ImagePropsBase , ImageStyle , TextStyle , AccessibilityProps } from 'react-native' ;
3
3
import { BadgeProps } from '../badge' ;
4
4
import { ImageProps } from '../image' ;
5
5
export declare enum StatusModes {
@@ -14,7 +14,7 @@ export declare enum BadgePosition {
14
14
BOTTOM_RIGHT = "BOTTOM_RIGHT" ,
15
15
BOTTOM_LEFT = "BOTTOM_LEFT"
16
16
}
17
- export declare type AvatarProps = {
17
+ export declare type AvatarProps = Pick < AccessibilityProps , 'accessibilityLabel' > & {
18
18
/**
19
19
* Adds fade in animation when Avatar image loads
20
20
*/
@@ -162,7 +162,100 @@ declare function createStyles(props: AvatarProps): {
162
162
} ;
163
163
} ;
164
164
export { Avatar } ;
165
- declare const _default : React . ComponentClass < AvatarProps & {
165
+ declare const _default : React . ComponentClass < Pick < AccessibilityProps , "accessibilityLabel" > & {
166
+ /**
167
+ * Adds fade in animation when Avatar image loads
168
+ */
169
+ animate ?: boolean | undefined ;
170
+ /**
171
+ * Background color for Avatar
172
+ */
173
+ backgroundColor ?: string | undefined ;
174
+ /**
175
+ * Badge location on Avatar
176
+ */
177
+ badgePosition ?: BadgePosition | undefined ;
178
+ /**
179
+ * Badge props passed down to Badge component
180
+ */
181
+ badgeProps ?: BadgeProps | undefined ;
182
+ /**
183
+ * Additional spacing styles for the container
184
+ */
185
+ containerStyle ?: StyleProp < ViewStyle > ;
186
+ /**
187
+ * The image source (external or assets)
188
+ */
189
+ source ?: number | import ( "react-native" ) . ImageURISource | import ( "react-native" ) . ImageURISource [ ] | undefined ;
190
+ /**
191
+ * Image props object
192
+ */
193
+ imageProps ?: ImageProps | undefined ;
194
+ /**
195
+ * Image style object used to pass additional style props
196
+ * by components which render image
197
+ */
198
+ imageStyle ?: ImageStyle | undefined ;
199
+ /**
200
+ * Listener-callback for when an image's (uri) loading
201
+ * starts (equiv. to Image.onLoadStart()).
202
+ */
203
+ onImageLoadStart ?: ( ( ) => void ) | undefined ;
204
+ /**
205
+ * Listener-callback for when an image's (uri) loading
206
+ * either succeeds or fails (equiv. to Image.onLoadEnd()).
207
+ */
208
+ onImageLoadEnd ?: ( ( ) => void ) | undefined ;
209
+ /**
210
+ * Listener-callback for when an image's (uri) loading
211
+ * fails (equiv. to Image.onError()).
212
+ */
213
+ onImageLoadError ?: ( ( error : import ( "react-native" ) . NativeSyntheticEvent < import ( "react-native" ) . ImageErrorEventData > ) => void ) | undefined ;
214
+ /**
215
+ * Label that can represent initials
216
+ */
217
+ label ?: string | undefined ;
218
+ /**
219
+ * The label color
220
+ */
221
+ labelColor ?: string | undefined ;
222
+ /**
223
+ * ribbon label to display on the avatar
224
+ */
225
+ ribbonLabel ?: string | undefined ;
226
+ /**
227
+ * ribbon custom style
228
+ */
229
+ ribbonStyle ?: StyleProp < ViewStyle > ;
230
+ /**
231
+ * ribbon label custom style
232
+ */
233
+ ribbonLabelStyle ?: StyleProp < TextStyle > ;
234
+ /**
235
+ * Custom ribbon
236
+ */
237
+ customRibbon ?: JSX . Element | undefined ;
238
+ /**
239
+ * Determine if to show online badge
240
+ */
241
+ isOnline ?: boolean | undefined ;
242
+ /**
243
+ * AWAY, ONLINE, OFFLINE or NONE mode (if set to a value other then 'NONE' will override isOnline prop)
244
+ */
245
+ status ?: StatusModes | undefined ;
246
+ /**
247
+ * Custom size for the Avatar
248
+ */
249
+ size : number ;
250
+ /**
251
+ * Press handler
252
+ */
253
+ onPress ?: ( ( props : any ) => void ) | undefined ;
254
+ /**
255
+ * Used as a testing identifier
256
+ */
257
+ testID ?: string | undefined ;
258
+ } & {
166
259
useCustomTheme ?: boolean | undefined ;
167
260
} , any > & typeof Avatar ;
168
261
export default _default ;
0 commit comments