Skip to content

Instantly share code, notes, and snippets.

@obliviusm
Created October 19, 2018 13:42
Show Gist options
  • Save obliviusm/db1ad9f96cac6befed036b8d1c662e0e to your computer and use it in GitHub Desktop.
Save obliviusm/db1ad9f96cac6befed036b8d1c662e0e to your computer and use it in GitHub Desktop.
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