Brandon Presley
9f02211d6a
Still need to work on: 1. Progress meter 2. Pause on tap 3. App icon 4. Dark/light mode detection 5. Height not being centered 6. Slide numbers on the bottom color
35 lines
752 B
TypeScript
35 lines
752 B
TypeScript
import {Dimensions, View} from 'react-native';
|
|
import {DocumentPickerResponse} from 'react-native-document-picker';
|
|
import Video from 'react-native-video';
|
|
import {backgroundColor} from './constants';
|
|
|
|
export default function Item({
|
|
slide,
|
|
value,
|
|
index,
|
|
}: {
|
|
slide: number;
|
|
value: DocumentPickerResponse;
|
|
index: number;
|
|
}) {
|
|
const height = Dimensions.get('screen').height;
|
|
|
|
return (
|
|
<View
|
|
style={{
|
|
height: '100%',
|
|
width: '100%',
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
backgroundColor,
|
|
}}>
|
|
<Video
|
|
key={value.name}
|
|
paused={slide !== index}
|
|
style={{width: 200, height: height / 2}}
|
|
source={{uri: value.uri}}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|