Created
April 25, 2015 04:21
-
-
Save soska/e9de562d431e7369756f to your computer and use it in GitHub Desktop.
Youtube Iframe
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
var React = require('react-native'); | |
var { | |
View, | |
WebView, | |
StyleSheet | |
} = React; | |
var style = StyleSheet.create({ | |
container : { | |
height:300, | |
backgroundColor:'transparent' | |
}, | |
frame : { | |
flex:1, | |
width:320, | |
height:315, | |
alignSelf:'stretch', | |
backgroundColor:'black' | |
} | |
}); | |
var Iframe = React.createClass({ | |
render() { | |
return ( | |
<View style={style.container}> | |
<WebView | |
url={this.props.source} | |
automaticallyAdjustContentInsets={false} | |
style={style.frame} | |
/> | |
</View> | |
); | |
} | |
}); | |
module.exports = Iframe; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment