Basic example ios reverse toggle logic

This commit is contained in:
Brad Adams 2016-11-09 01:19:32 +01:00
parent 70799eca9b
commit f3ba2ee5d2
1 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@ class Basic extends Component {
constructor() {
super()
this.state = {
hideBlurs: false,
showBlurs: true,
blurBlurType: 'light',
blurActiveSegment: 1,
vibrancyBlurType: 'dark',
@ -54,11 +54,9 @@ class Basic extends Component {
resizeMode='cover'
style={styles.img}/>
{(this.state.hideBlurs
{(this.state.showBlurs
? null
: <View style={styles.container}>
? <View style={styles.container}>
<BlurView
blurType={this.state.blurBlurType}
@ -87,13 +85,15 @@ class Basic extends Component {
</VibrancyView>
</View>
: null
)}
<View
style={styles.blurToggle}>
<Switch
onValueChange={(value) => this.setState({hideBlurs: value})}
value={this.state.hideBlurs} />
onValueChange={(value) => this.setState({showBlurs: value})}
value={this.state.showBlurs} />
</View>
</View>