2016-05-06 09:35:18 +00:00
|
|
|
var React = require('react');
|
|
|
|
var {
|
|
|
|
Component,
|
|
|
|
PropTypes
|
|
|
|
} = React;
|
|
|
|
|
|
|
|
var ReactNative = require('react-native');
|
2015-10-05 20:41:32 +00:00
|
|
|
var {
|
|
|
|
AppRegistry,
|
|
|
|
StyleSheet,
|
|
|
|
Text,
|
|
|
|
View,
|
|
|
|
Image,
|
2016-05-06 09:35:18 +00:00
|
|
|
} = ReactNative;
|
2015-10-05 20:41:32 +00:00
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
justifyContent: 'center',
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
},
|
|
|
|
welcome: {
|
|
|
|
fontSize: 20,
|
|
|
|
textAlign: 'center',
|
|
|
|
margin: 10,
|
|
|
|
color: '#FFFFFF',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
var BlurView = require('react-native-blur').BlurView;
|
|
|
|
var VibrancyView = require('react-native-blur').VibrancyView;
|
|
|
|
|
|
|
|
var background = 'http://iphonewallpapers-hd.com/thumbs/firework_iphone_wallpaper_5-t2.jpg';
|
|
|
|
|
|
|
|
class Basic extends Component {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Image source={{uri: background, }} style={styles.container}>
|
|
|
|
<BlurView blurType="light" style={styles.container}>
|
|
|
|
<Text style={styles.welcome}>Blur component</Text>
|
|
|
|
</BlurView>
|
|
|
|
|
|
|
|
<VibrancyView blurType="dark" style={styles.container}>
|
|
|
|
<Text style={styles.welcome}>Vibrancy component</Text>
|
|
|
|
</VibrancyView>
|
|
|
|
</Image>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AppRegistry.registerComponent('Basic', () => Basic);
|