File tree Expand file tree Collapse file tree 5 files changed +7
-31
lines changed Expand file tree Collapse file tree 5 files changed +7
-31
lines changed Original file line number Diff line number Diff line change 77 View ,
88} from 'react-native' ;
99import React , { useRef } from 'react' ;
10- import Gallery , { GalleryRef } from '../../src/index ' ;
10+ import Gallery , { GalleryRef } from '../../src' ;
1111
1212const image1 = require ( '../assets/image1.jpeg' ) ;
1313const image2 = require ( '../assets/image2.jpeg' ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
1919 SCREEN_HEIGHT ,
2020 VERTICAL_ACTIVATION_THRESHOLD ,
2121} from './constants' ;
22- import type { GalleryProps , GalleryRef } from './Type ' ;
22+ import type { GalleryProps , GalleryRef } from './types ' ;
2323import { GestureHandlerRootView } from 'react-native-gesture-handler' ;
2424
2525const Gallery = forwardRef < GalleryRef , GalleryProps > (
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import {
2020 SCREEN_WIDTH ,
2121 VERTICAL_ACTIVATION_THRESHOLD ,
2222} from './constants' ;
23- import type { ImageViewerProps } from './Type ' ;
23+ import type { ImageViewerProps } from './types ' ;
2424
2525const ImageViewer = ( {
2626 source,
Original file line number Diff line number Diff line change 1- import type {
2- GalleryRef as GalleryRefType ,
3- GalleryProps as GalleryPropsType ,
4- ImageViewerProps as ImageViewerPropsType ,
5- } from './Type' ;
1+ import type { GalleryRef , GalleryProps , ImageViewerProps } from './types' ;
62import type {
73 ComponentType ,
84 ForwardRefExoticComponent ,
@@ -12,13 +8,10 @@ import GalleryComponent from './Gallery';
128import ImageViewerComponent from './ImageViewer' ;
139
1410const Gallery : ForwardRefExoticComponent <
15- GalleryPropsType & RefAttributes < GalleryRefType >
11+ GalleryProps & RefAttributes < GalleryRef >
1612> = GalleryComponent ;
17- const ImageViewer : ComponentType < ImageViewerPropsType > = ImageViewerComponent ;
18-
19- export type GalleryRef = GalleryRefType ;
20- export type GalleryProps = GalleryPropsType ;
21- export type ImageViewerProps = ImageViewerPropsType ;
13+ const ImageViewer : ComponentType < ImageViewerProps > = ImageViewerComponent ;
2214
15+ export type { GalleryRef , GalleryProps } ;
2316export { ImageViewer } ;
2417export default Gallery ;
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import type {
22 ImageStyle ,
33 ImageSourcePropType ,
44 ViewStyle ,
5- FlatList ,
65 FlatListProps ,
76} from 'react-native' ;
87import type { SharedValue } from 'react-native-reanimated' ;
@@ -61,19 +60,3 @@ export interface GalleryRef {
6160 /** Whether the gallery is currently visible */
6261 isVisible : boolean ;
6362}
64-
65- /**
66- * Internal control interface for the Gallery component
67- */
68- export interface GalleryControl {
69- /** Show the gallery at the specified index */
70- show : ( index ?: number ) => void ;
71- /** Hide the gallery */
72- hide : ( ) => void ;
73- /** Shared value indicating whether the gallery is visible */
74- isVisible : SharedValue < boolean > ;
75- /** Shared value for translation on Y axis */
76- translateY : SharedValue < number > ;
77- /** Reference to the FlatList component */
78- flatListRef : React . RefObject < FlatList > ;
79- }
You can’t perform that action at this time.
0 commit comments