Created
January 17, 2018 03:49
-
-
Save anonymous/6560364101fdefef6bdca3ecd9d7c7fc 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 from 'react'; | |
import { StyleSheet, Text, View, Image, Modal, Button, ScrollView } from 'react-native'; | |
const MovieDetail = props => { | |
const { MovieTitle, MovieDetailViewStyle } = styles; | |
let modalContent = null; | |
//console.log('moviedetail ', props.selectedMovieTrending.movieTrending.title); | |
if(props.selectedMovieTrending){ | |
modalContent = ( | |
<View> | |
<Text style={MovieTitle}>{props.selectedMovieTrending.movieT.title}</Text> | |
</View> | |
); | |
} | |
return( | |
<Modal animationTyp='slide' visible={props.selectedMovieTrending !== null}> | |
<View style={MovieDetailViewStyle}> | |
{modalContent} | |
</View> | |
<View> | |
<Button title='Close' onPress={props.closeModal}/> | |
</View> | |
</Modal> | |
); | |
}; | |
const styles = { | |
MovieDetailViewStyle:{ | |
flex:1, | |
backgroundColor: '#000' | |
}, | |
MovieTitle: { | |
fontSize: 20, | |
color: '#fff' | |
} | |
}; | |
export default MovieDetail; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment