Skip to content

Commit e207552

Browse files
authored
Fix the example project (Kureev#361)
1 parent 47a199e commit e207552

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

example/App.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ export default class Basic extends Component {
4646

4747
renderBlurs() {
4848
const tintColor = this.state.blurBlurType === 'xlight' ? 'black' : 'white';
49+
const platform = Platform.OS === 'ios' ? 'iOS' : 'Android';
4950

5051
return (
5152
<View style={styles.container}>
52-
5353
<View style={styles.blurContainer}>
5454
{/*
5555
BlurView is supported on both iOS and Android.
@@ -62,27 +62,25 @@ export default class Basic extends Component {
6262
blurAmount={100}
6363
style={[styles.blurView]}>
6464
<Text style={[styles.text, { color: tintColor }]}>
65-
Blur component (iOS)
65+
Blur component ({platform})
6666
</Text>
67-
{{
68-
Platform.OS === "ios" &&
67+
{Platform.OS === 'ios' &&
6968
<SegmentedControlIOS
7069
values={['xlight', 'light', 'dark', 'regular', 'prominent']}
7170
selectedIndex={this.state.blurActiveSegment}
7271
onChange={(event) => {this._onBlurChange(event);}}
7372
onValueChange={(value) => {this._onBlurValueChange(value);}}
7473
tintColor={tintColor}
75-
/>
76-
}}
74+
/>}
7775
</BlurView>
7876
</View>
7977

80-
{/*
81-
VibrancyView is only supported on iOS, and must contain child views,
82-
otherwise the vibrancy effect doesn't work.
83-
*/}
84-
{{
85-
Platform.OS === "ios" &&
78+
{
79+
/*
80+
VibrancyView is only supported on iOS, and must contain child views,
81+
otherwise the vibrancy effect doesn't work.
82+
*/
83+
Platform.OS === 'ios' &&
8684
<VibrancyView
8785
blurType={this.state.vibrancyBlurType}
8886
blurAmount={10}
@@ -100,7 +98,7 @@ export default class Basic extends Component {
10098
tintColor="white"
10199
/>
102100
</VibrancyView>
103-
}}
101+
}
104102
</View>
105103
);
106104
}

0 commit comments

Comments
 (0)