UNPKG

@mr_gain/react-native-image-modal

Version:
55 lines 2.13 kB
import type { ReactNode, RefObject } from 'react'; import React from 'react'; import type { StyleProp, ImageStyle, ImageResizeMode, ImageSourcePropType, NativeSyntheticEvent, ImageErrorEventData } from 'react-native'; import { ImageDetail } from './components'; import type { OnTap, OnMove } from './types'; interface ReactNativeImageModal { readonly isOpen: boolean; open(): void; close(): void; } interface Props { readonly source: ImageSourcePropType; readonly style?: StyleProp<ImageStyle>; readonly resizeMode?: ImageResizeMode; readonly isRTL?: boolean; readonly renderToHardwareTextureAndroid?: boolean; readonly isTranslucent?: boolean; readonly swipeToDismiss?: boolean; readonly imageBackgroundColor?: string; readonly overlayBackgroundColor?: string; readonly hideCloseButton?: boolean; readonly modalRef?: RefObject<ImageDetail>; readonly disabled?: boolean; readonly modalImageStyle?: ImageStyle; readonly modalImageResizeMode?: ImageResizeMode; readonly parentLayout?: { readonly x: number; readonly y: number; readonly width: number; readonly height: number; }; readonly animationDuration?: number; onError?(event: NativeSyntheticEvent<ImageErrorEventData>): void; renderHeader?(close: () => void): ReactNode; renderFooter?(close: () => void): ReactNode; renderImageComponent?(params: { readonly source: ImageSourcePropType; readonly style?: StyleProp<ImageStyle>; readonly resizeMode: ImageResizeMode; }): ReactNode; onLongPressOriginImage?(): void; onTap?(eventParams: OnTap): void; onDoubleTap?(): void; onLongPress?(): void; onOpen?(): void; didOpen?(): void; onMove?(position: OnMove): void; responderRelease?(vx?: number, scale?: number): void; willClose?(): void; onClose?(): void; } declare const ImageModal: React.ForwardRefExoticComponent<Props & React.RefAttributes<ReactNativeImageModal>>; export default ImageModal; export type { ReactNativeImageModal, ImageDetail }; //# sourceMappingURL=index.d.ts.map