Update README.md

Fixed example code
This commit is contained in:
Toni 2020-04-01 13:48:12 +02:00 committed by GitHub
parent e2075520c7
commit aeb9395c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 7 deletions

View File

@ -110,19 +110,20 @@ export default class Menu extends Component {
render() { render() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Text>Hi, I am some unblurred text</Text> <Image
key={'blurryImage'}
source={{ uri }}
style={styles.absolute}
/>
<Text style={styles.absolute}>Hi, I am some blurred text</Text>
{/* in terms of positioning and zIndex-ing everything before the BlurView will be blurred */}
<BlurView <BlurView
style={styles.absolute} style={styles.absolute}
viewRef={this.state.viewRef} viewRef={this.state.viewRef}
blurType="light" blurType="light"
blurAmount={10} blurAmount={10}
>
<Text>I'm the BlurView content on both iOS and Android</Text>
</BlurView>
<Image
source={{ uri }}
style={styles.absolute}
/> />
<Text>I'm the non blurred text because I got rendered on top of the BlurView</Text>
</View> </View>
); );
} }