UNPKG

4.22 kBTypeScriptView Raw
1import * as React from 'react';
2import { ImageSourcePropType, View, ViewStyle, StyleProp } from 'react-native';
3export declare type AvatarImageSource = ImageSourcePropType | ((props: {
4 size: number;
5}) => React.ReactNode);
6declare type Props = React.ComponentPropsWithRef<typeof View> & {
7 /**
8 * Image to display for the `Avatar`.
9 * It accepts a standard React Native Image `source` prop
10 * Or a function that returns an `Image`.
11 */
12 source: AvatarImageSource;
13 /**
14 * Size of the avatar.
15 */
16 size?: number;
17 style?: StyleProp<ViewStyle>;
18 /**
19 * @optional
20 */
21 theme: ReactNativePaper.Theme;
22};
23declare const _default: (React.ComponentClass<Pick<Props, "ref" | "source" | "style" | "pointerEvents" | "size" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture"> & {
24 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
25}, any> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & {
26 ({ size, source, style, theme, ...rest }: Props): JSX.Element;
27 displayName: string;
28}) | (React.FunctionComponent<Props> & {
29 ({ size, source, style, theme, ...rest }: Props): JSX.Element;
30 displayName: string;
31}), {}>) | (React.FunctionComponent<Pick<Props, "ref" | "source" | "style" | "pointerEvents" | "size" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture"> & {
32 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
33}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & {
34 ({ size, source, style, theme, ...rest }: Props): JSX.Element;
35 displayName: string;
36}) | (React.FunctionComponent<Props> & {
37 ({ size, source, style, theme, ...rest }: Props): JSX.Element;
38 displayName: string;
39}), {}>);
40export default _default;