UNPKG

react-native-fast-image

Version:
49 lines (48 loc) • 1.89 kB
import type { CodegenTypes, ColorValue, HostComponent, ViewProps } from 'react-native'; type LoadStartEvent = Readonly<{}>; type ProgressEvent = Readonly<{ loaded: CodegenTypes.Double; total: CodegenTypes.Double; progress: CodegenTypes.Double; }>; type LoadEvent = Readonly<{ width: CodegenTypes.Double; height: CodegenTypes.Double; }>; type ErrorEvent = Readonly<{ error: string; }>; type LoadEndEvent = Readonly<{ ok: boolean; width?: CodegenTypes.Double; height?: CodegenTypes.Double; error?: string; }>; export interface NativeProps extends ViewProps { source?: CodegenTypes.UnsafeMixed; sources?: CodegenTypes.UnsafeMixed; defaultSource?: CodegenTypes.UnsafeMixed; objectFit?: CodegenTypes.WithDefault<string, 'cover'>; objectPositionX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.5>; objectPositionXOffset?: CodegenTypes.Float; objectPositionY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.5>; objectPositionYOffset?: CodegenTypes.Float; tintColor?: ColorValue; recyclingKey?: string; loopCount?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>; imageRendering?: string; paused?: boolean; transitionDuration?: CodegenTypes.Double; transitionBetweenImages?: boolean; transitionSkipOnCacheHit?: string; downsample?: CodegenTypes.WithDefault<boolean, true>; blurRadius?: CodegenTypes.Float; handledEvents?: CodegenTypes.Int32; onFastImageLoadStart?: CodegenTypes.DirectEventHandler<LoadStartEvent>; onFastImageProgress?: CodegenTypes.DirectEventHandler<ProgressEvent>; onFastImageLoad?: CodegenTypes.DirectEventHandler<LoadEvent>; onFastImageError?: CodegenTypes.DirectEventHandler<ErrorEvent>; onFastImageLoadEnd?: CodegenTypes.DirectEventHandler<LoadEndEvent>; } declare const _default: HostComponent<NativeProps>; export default _default;