Fix the example project (#361)

This commit is contained in:
Alexey Kureev 2020-03-10 23:19:19 +00:00 committed by GitHub
parent 47a199ef98
commit e2075520c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 13 deletions

View File

@ -46,10 +46,10 @@ export default class Basic extends Component {
renderBlurs() {
const tintColor = this.state.blurBlurType === 'xlight' ? 'black' : 'white';
const platform = Platform.OS === 'ios' ? 'iOS' : 'Android';
return (
<View style={styles.container}>
<View style={styles.blurContainer}>
{/*
BlurView is supported on both iOS and Android.
@ -62,27 +62,25 @@ export default class Basic extends Component {
blurAmount={100}
style={[styles.blurView]}>
<Text style={[styles.text, { color: tintColor }]}>
Blur component (iOS)
Blur component ({platform})
</Text>
{{
Platform.OS === "ios" &&
{Platform.OS === 'ios' &&
<SegmentedControlIOS
values={['xlight', 'light', 'dark', 'regular', 'prominent']}
selectedIndex={this.state.blurActiveSegment}
onChange={(event) => {this._onBlurChange(event);}}
onValueChange={(value) => {this._onBlurValueChange(value);}}
tintColor={tintColor}
/>
}}
/>}
</BlurView>
</View>
{/*
VibrancyView is only supported on iOS, and must contain child views,
otherwise the vibrancy effect doesn't work.
*/}
{{
Platform.OS === "ios" &&
{
/*
VibrancyView is only supported on iOS, and must contain child views,
otherwise the vibrancy effect doesn't work.
*/
Platform.OS === 'ios' &&
<VibrancyView
blurType={this.state.vibrancyBlurType}
blurAmount={10}
@ -100,7 +98,7 @@ export default class Basic extends Component {
tintColor="white"
/>
</VibrancyView>
}}
}
</View>
);
}