Skip to content

Commit 70d9405

Browse files
committed
Update generatedTypes
1 parent d995531 commit 70d9405

File tree

1 file changed

+96
-3
lines changed

1 file changed

+96
-3
lines changed

generatedTypes/components/avatar/index.d.ts

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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';
33
import { BadgeProps } from '../badge';
44
import { ImageProps } from '../image';
55
export declare enum StatusModes {
@@ -14,7 +14,7 @@ export declare enum BadgePosition {
1414
BOTTOM_RIGHT = "BOTTOM_RIGHT",
1515
BOTTOM_LEFT = "BOTTOM_LEFT"
1616
}
17-
export declare type AvatarProps = {
17+
export declare type AvatarProps = Pick<AccessibilityProps, 'accessibilityLabel'> & {
1818
/**
1919
* Adds fade in animation when Avatar image loads
2020
*/
@@ -162,7 +162,100 @@ declare function createStyles(props: AvatarProps): {
162162
};
163163
};
164164
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+
} & {
166259
useCustomTheme?: boolean | undefined;
167260
}, any> & typeof Avatar;
168261
export default _default;

0 commit comments

Comments
 (0)