Skip to content

Commit 47ec787

Browse files
committed
fix: export image object type
1 parent a75f21c commit 47ec787

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

example/src/App.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { Button, SafeAreaView, StyleSheet, View } from 'react-native';
33
import { Dirs } from 'react-native-file-access';
44
import { CachedImage, CacheManager } from '@georstat/react-native-image-cache';
55

6-
import { ImageGallery } from '@georstat/react-native-image-gallery';
6+
import {
7+
ImageGallery,
8+
ImageObject,
9+
} from '@georstat/react-native-image-gallery';
710
import { images } from './helpers';
811
import Header from './Header';
912
import Footer from './Footer';
@@ -15,10 +18,6 @@ CacheManager.config = {
1518
thumbnailAnimationDuration: 1000,
1619
};
1720

18-
interface Image {
19-
url: string;
20-
}
21-
2221
const App = () => {
2322
const [isOpen, setIsOpen] = useState(false);
2423
const [isCustomGalleryOpen, setIsCustomGalleryOpen] = useState(false);
@@ -37,7 +36,7 @@ const App = () => {
3736
return <Footer total={images.length} currentIndex={currentIndex} />;
3837
};
3938

40-
const renderCustomImage = (image: Image) => {
39+
const renderCustomImage = (image: ImageObject) => {
4140
return (
4241
<View style={styles.customImageContainer}>
4342
<CachedImage

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export { default as ImageGallery } from './ImageGallery';
2+
export { ImageObject } from './types';

0 commit comments

Comments
 (0)