mirror of
https://github.com/status-im/react-native-blur.git
synced 2025-02-16 18:37:03 +00:00
Merge pull request #72 from MichaelHancock/master
Updated example to use ES6 features
This commit is contained in:
commit
025a23a51d
@ -1,17 +1,11 @@
|
|||||||
var React = require('react');
|
import React, {Component} from 'react';
|
||||||
var {
|
import {
|
||||||
Component,
|
|
||||||
PropTypes
|
|
||||||
} = React;
|
|
||||||
|
|
||||||
var ReactNative = require('react-native');
|
|
||||||
var {
|
|
||||||
AppRegistry,
|
AppRegistry,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
View,
|
|
||||||
Image,
|
Image,
|
||||||
} = ReactNative;
|
} from 'react-native';
|
||||||
|
import {BlurView, VibrancyView} from 'react-native-blur';
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
@ -27,15 +21,12 @@ const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
var BlurView = require('react-native-blur').BlurView;
|
const background = 'http://iphonewallpapers-hd.com/thumbs/firework_iphone_wallpaper_5-t2.jpg';
|
||||||
var VibrancyView = require('react-native-blur').VibrancyView;
|
|
||||||
|
|
||||||
var background = 'http://iphonewallpapers-hd.com/thumbs/firework_iphone_wallpaper_5-t2.jpg';
|
|
||||||
|
|
||||||
class Basic extends Component {
|
class Basic extends Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Image source={{uri: background, }} style={styles.container}>
|
<Image source={{uri: background}} style={styles.container}>
|
||||||
<BlurView blurType="light" style={styles.container}>
|
<BlurView blurType="light" style={styles.container}>
|
||||||
<Text style={styles.welcome}>Blur component</Text>
|
<Text style={styles.welcome}>Blur component</Text>
|
||||||
</BlurView>
|
</BlurView>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user