Created
March 13, 2017 13:53
-
-
Save hannigand/039e90472d131a2d9d830e0f3943f16c 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, { Component } from "react"; | |
import { | |
Modal, | |
View, | |
Text, | |
WebView, | |
Dimensions, | |
TouchableOpacity, | |
} from "react-native"; | |
import Icon from "react-native-vector-icons/Ionicons"; | |
import { formatDate } from "../utils/helpers"; | |
const { height, width } = Dimensions.get("window"); | |
const Video = (props) => { | |
console.log("Should I be shown?", props.isVisible); | |
return ( | |
<Modal | |
visible={props.isVisible} | |
> | |
<View style={{flex: 1, padding: 16}}> | |
<View style={{ | |
paddingTop: 16, | |
paddingRight: 8, | |
paddingBottom: 16, | |
paddingLeft: 8, | |
marginBottom: 8, | |
alignItems: "flex-end", | |
}}> | |
<TouchableOpacity onPress={() => props.closeVideo()} > | |
<Icon | |
name="ios-close-outline" | |
size={45} | |
/> | |
</TouchableOpacity> | |
</View> | |
<View style={{ height: (width - 32) * 9 / 16}}> | |
<WebView | |
source={{uri: ""}} | |
scrollingEnabled={false} | |
/> | |
</View> | |
<Text style={{fontSize: 17, marginTop: 16}}>{props.title}</Text> | |
<Text style={{fontSize: 13, marginBottom: 16,}}>Last Watched: {formatDate(props.lastWatched)}</Text> | |
</View> | |
</Modal> | |
) | |
} | |
export default Video; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment