-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
34 lines (31 loc) · 786 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { SortableGallery } from './src';
import { StyleSheet } from 'react-native';
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
import { Image } from 'types';
import { items } from './items';
export default function App() {
function handleDragEnd(item: Image) {
console.log('handleDragEnd', item);
}
return (
<SafeAreaProvider>
<SafeAreaView style={styles.container}>
<SortableGallery
items={items}
cols={3}
imageTileStyles={styles.imageTileStyles}
onDragEnd={handleDragEnd}
isEditing
/>
</SafeAreaView>
</SafeAreaProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
imageTileStyles: {
borderRadius: 2,
},
});