react-native-photos-gallery
Version:
A React Native animated custom photo gallery component
34 lines (33 loc) • 1.42 kB
TypeScript
import React from 'react';
import Animated from 'react-native-reanimated';
import type { ArrayData, PhotosModalProps } from '../Types';
declare const usePhotoModal: ({ origin, visible, children, index, item, onClose, animationCloseSpeed, thumbnailListImageWidth, thumbnailListImageSpace, animatedThumbnailScrollSpeed, animatedImageDelay, }: Pick<PhotosModalProps, 'origin' | 'children' | 'visible' | 'index' | 'item' | 'onClose' | 'thumbnailListImageWidth' | 'animationCloseSpeed' | 'animatedThumbnailScrollSpeed' | 'animatedImageDelay' | 'thumbnailListImageSpace'>) => {
handleScroll: () => void;
animatedProps: Partial<{
contentOffset: {
x: number;
y: number;
};
}>;
renderChildren: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
close: () => void;
boxOpacityStyle: {
opacity: number;
};
closeStyle: {
opacity: number;
borderRadius: number;
};
openStyle: {
left: number;
top: number;
width: number;
height: number;
};
footerFlatListRef: React.MutableRefObject<Animated.FlatList<ArrayData>>;
currentItem: ArrayData;
setCurrentItem: React.Dispatch<React.SetStateAction<ArrayData>>;
setFooterHeight: React.Dispatch<React.SetStateAction<number>>;
offsetY: import("react-native-reanimated").SharedValue<number>;
};
export default usePhotoModal;