Created
October 19, 2018 13:42
-
-
Save obliviusm/db1ad9f96cac6befed036b8d1c662e0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { SFC } from 'react' | |
import { View, Text, Image, TouchableOpacity } from 'react-native' | |
import styles from './styles' | |
interface PreviewProps { | |
preview: Preview | |
} | |
interface Preview { | |
previewImage: string | |
name: string | |
id: string | |
duration: string | |
} | |
const PreviewSlide: SFC<PreviewProps> = ({ preview }) => { | |
const { previewImage, name, id, duration } = preview | |
return ( | |
<View style={styles.slideHolder}> | |
<TouchableOpacity onPress={() => true}> | |
<Image style={styles.slideImage} source={{ uri: previewImage }} /> | |
</TouchableOpacity> | |
<Text style={styles.videoDuration}>{duration}</Text> | |
<Text numberOfLines={2} style={styles.slideText}> | |
{name} | |
</Text> | |
</View> | |
) | |
} | |
export default PreviewSlide |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment