1 | import React from 'react';
|
2 | import { Animated, Image as ImageNative, ImageProps as RNImageProps, ViewStyle, StyleProp } from 'react-native';
|
3 | import { ThemeProps } from '../config';
|
4 | export declare type ImageProps = RNImageProps & {
|
5 | Component?: typeof React.Component;
|
6 | onPress?(): void;
|
7 | onLongPress?(): void;
|
8 | ImageComponent?: React.ComponentType<any>;
|
9 | PlaceholderContent?: React.ReactElement<any>;
|
10 | containerStyle?: StyleProp<ViewStyle>;
|
11 | childrenContainerStyle?: StyleProp<ViewStyle>;
|
12 | placeholderStyle?: StyleProp<ViewStyle>;
|
13 | transition?: boolean;
|
14 | transitionDuration?: number;
|
15 | };
|
16 | declare type ImageState = {
|
17 | placeholderOpacity: Animated.Value;
|
18 | };
|
19 | declare class Image extends React.Component<ImageProps & Partial<ThemeProps<ImageProps>>, ImageState> {
|
20 | static getSize: typeof ImageNative.getSize;
|
21 | static getSizeWithHeaders: typeof ImageNative.getSizeWithHeaders;
|
22 | static prefetch: typeof ImageNative.prefetch;
|
23 | static abortPrefetch: typeof ImageNative.abortPrefetch;
|
24 | static queryCache: typeof ImageNative.queryCache;
|
25 | static resolveAssetSource: typeof ImageNative.resolveAssetSource;
|
26 | state: {
|
27 | placeholderOpacity: Animated.Value;
|
28 | };
|
29 | onLoad: (e: any) => void;
|
30 | render(): JSX.Element;
|
31 | }
|
32 | export { Image };
|
33 | declare const _default: React.FunctionComponent<Omit<RNImageProps & {
|
34 | Component?: typeof React.Component;
|
35 | onPress?(): void;
|
36 | onLongPress?(): void;
|
37 | ImageComponent?: React.ComponentType<any>;
|
38 | PlaceholderContent?: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
39 | containerStyle?: StyleProp<ViewStyle>;
|
40 | childrenContainerStyle?: StyleProp<ViewStyle>;
|
41 | placeholderStyle?: StyleProp<ViewStyle>;
|
42 | transition?: boolean;
|
43 | transitionDuration?: number;
|
44 | } & Partial<ThemeProps<ImageProps>>, keyof ThemeProps<T>>> | React.ForwardRefExoticComponent<RNImageProps & {
|
45 | Component?: typeof React.Component;
|
46 | onPress?(): void;
|
47 | onLongPress?(): void;
|
48 | ImageComponent?: React.ComponentType<any>;
|
49 | PlaceholderContent?: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
50 | containerStyle?: StyleProp<ViewStyle>;
|
51 | childrenContainerStyle?: StyleProp<ViewStyle>;
|
52 | placeholderStyle?: StyleProp<ViewStyle>;
|
53 | transition?: boolean;
|
54 | transitionDuration?: number;
|
55 | } & Partial<ThemeProps<ImageProps>>>;
|
56 | export default _default;
|