mirror of
https://github.com/status-im/react-native-blur.git
synced 2025-01-12 09:34:16 +00:00
Basic example ios reverse toggle logic
This commit is contained in:
parent
70799eca9b
commit
f3ba2ee5d2
@ -20,7 +20,7 @@ class Basic extends Component {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
this.state = {
|
this.state = {
|
||||||
hideBlurs: false,
|
showBlurs: true,
|
||||||
blurBlurType: 'light',
|
blurBlurType: 'light',
|
||||||
blurActiveSegment: 1,
|
blurActiveSegment: 1,
|
||||||
vibrancyBlurType: 'dark',
|
vibrancyBlurType: 'dark',
|
||||||
@ -54,11 +54,9 @@ class Basic extends Component {
|
|||||||
resizeMode='cover'
|
resizeMode='cover'
|
||||||
style={styles.img}/>
|
style={styles.img}/>
|
||||||
|
|
||||||
{(this.state.hideBlurs
|
{(this.state.showBlurs
|
||||||
|
|
||||||
? null
|
? <View style={styles.container}>
|
||||||
|
|
||||||
: <View style={styles.container}>
|
|
||||||
|
|
||||||
<BlurView
|
<BlurView
|
||||||
blurType={this.state.blurBlurType}
|
blurType={this.state.blurBlurType}
|
||||||
@ -87,13 +85,15 @@ class Basic extends Component {
|
|||||||
</VibrancyView>
|
</VibrancyView>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
: null
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={styles.blurToggle}>
|
style={styles.blurToggle}>
|
||||||
<Switch
|
<Switch
|
||||||
onValueChange={(value) => this.setState({hideBlurs: value})}
|
onValueChange={(value) => this.setState({showBlurs: value})}
|
||||||
value={this.state.hideBlurs} />
|
value={this.state.showBlurs} />
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user