Skip to content

Commit af8b8ad

Browse files
committed
enable back usage of react-native-blur
1 parent 683190e commit af8b8ad

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ PODS:
227227
- React
228228
- ReactNativeUiLib (2.0.1):
229229
- React
230-
- RNCAsyncStorage (1.6.3):
230+
- RNCAsyncStorage (1.7.1):
231231
- React
232232
- RNGestureHandler (1.5.2):
233233
- React
@@ -381,7 +381,7 @@ SPEC CHECKSUMS:
381381
ReactNativeKeyboardTrackingView: a240a6a0dba852bb107109a7ec7e98b884055977
382382
ReactNativeNavigation: bed6f504aa1a4dadd151503bf99d0ef96d06847f
383383
ReactNativeUiLib: 217f90ec42d9cfcd136a442f6963cd9c744e0bc1
384-
RNCAsyncStorage: 6b57de0f6cb0dcfd17521af1681fa39001d3efff
384+
RNCAsyncStorage: 8539fc80a0075fcc9c8e2dff84cd22dc5bf1dacf
385385
RNGestureHandler: 946a7691e41df61e2c4b1884deab41a4cdc3afff
386386
RNReanimated: b2ab0b693dddd2339bd2f300e770f6302d2e960c
387387
RNTextSize: 91955a6ea2adda9dc7802ce472b7a4dc717686f6

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@babel/preset-env": "^7.3.1",
5757
"@babel/runtime": "^7.4.2",
5858
"@react-native-community/async-storage": "^1.6.2",
59-
"@react-native-community/blur": "git+https://github.com/react-native-community/react-native-blur.git#master",
59+
"@react-native-community/blur": "^3.4.1",
6060
"@react-native-community/eslint-config": "latest",
6161
"@types/prop-types": "^15.5.3",
6262
"@types/react-native": "^0.55.21",
@@ -90,6 +90,7 @@
9090
"react-native": ">=0.51.0",
9191
"react-native-gesture-handler": ">=1.5.0",
9292
"react-native-reanimated": ">=1.4.0",
93+
"@react-native-community/blur": ">=3.4.1",
9394
"react-native-interactable": ">=2.0.0"
9495
},
9596
"jest": {

src/components/card/CardSection.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
import {StyleSheet} from 'react-native';
4-
// import {BlurView} from '@react-native-community/blur';
4+
import {BlurView} from '@react-native-community/blur';
55
import {BaseComponent} from '../../commons';
6-
// import {Constants} from '../../helpers';
6+
import {Constants} from '../../helpers';
77
import View from '../view';
88

99
/**
@@ -46,8 +46,8 @@ export default class CardSection extends BaseComponent {
4646
}
4747

4848
render() {
49-
const {/* enableBlur, */blurOptions, style, ...others} = this.props;
50-
const Container = /* Constants.isIOS && enableBlur ? BlurView : */View;
49+
const {enableBlur, blurOptions, style, ...others} = this.props;
50+
const Container = Constants.isIOS && enableBlur ? BlurView : View;
5151
const {paddings} = this.state;
5252
return (
5353
<Container {...blurOptions} style={[this.styles.container, paddings, style]} {...others}>

src/components/card/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import _ from 'lodash';
22
import PropTypes from 'prop-types';
33
import React from 'react';
44
import {StyleSheet, ViewPropTypes, Animated} from 'react-native';
5-
// import {BlurView} from '@react-native-community/blur';
5+
import {BlurView} from '@react-native-community/blur';
66
import {Constants} from '../../helpers';
77
import {Colors, BorderRadiuses} from '../../style';
88
import {PureBaseComponent} from '../../commons';
@@ -218,8 +218,8 @@ class Card extends PureBaseComponent {
218218
}
219219

220220
render() {
221-
const {onPress, style, selected, containerStyle, /* enableBlur, */ ...others} = this.getThemeProps();
222-
// const blurOptions = this.getBlurOptions();
221+
const {onPress, style, selected, containerStyle, enableBlur, ...others} = this.getThemeProps();
222+
const blurOptions = this.getBlurOptions();
223223
const Container = onPress ? TouchableOpacity : View;
224224
const brRadius = this.borderRadius;
225225

@@ -241,9 +241,9 @@ class Card extends PureBaseComponent {
241241
{...others}
242242
ref={this.setRef}
243243
>
244-
{/* {Constants.isIOS && enableBlur && (
244+
{Constants.isIOS && enableBlur && (
245245
<BlurView style={[this.styles.blurView, {borderRadius: brRadius}]} {...blurOptions}/>
246-
)} */}
246+
)}
247247

248248
{this.renderChildren()}
249249
{this.renderSelection()}

src/components/toast/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
33
import React from 'react';
44
import {StyleSheet} from 'react-native';
55
import {View as AnimatableView, Text as AnimatableText} from 'react-native-animatable';
6-
// import {BlurView} from '@react-native-community/blur';
6+
import {BlurView} from '@react-native-community/blur';
77
import {BaseComponent} from '../../commons';
88
import {AnimatableManager, ThemeManager, Colors, Typography, BorderRadiuses} from '../../style';
99
import Assets from '../../assets';
@@ -282,13 +282,13 @@ export default class Toast extends BaseComponent {
282282

283283
// This weird layout should support iphoneX safe area
284284
render() {
285-
const {backgroundColor, actions, /* enableBlur, */testID, zIndex, renderContent} = this.getThemeProps();
285+
const {backgroundColor, actions, enableBlur, testID, zIndex, renderContent} = this.getThemeProps();
286286
const {animationConfig} = this.state;
287287
const hasOneAction = _.size(actions) === 1;
288288
const hasTwoActions = _.size(actions) === 2;
289289
const positionStyle = this.getPositionStyle();
290290
const height = getHeight(this.props);
291-
// const blurOptions = this.getBlurOptions();
291+
const blurOptions = this.getBlurOptions();
292292

293293
const shouldShowToast = this.shouldShowToast();
294294
if (!shouldShowToast) {
@@ -308,7 +308,7 @@ export default class Toast extends BaseComponent {
308308
]}
309309
{...animationConfig}
310310
>
311-
{/* {enableBlur && <BlurView style={this.styles.blurView} {...blurOptions}/>} */}
311+
{enableBlur && <BlurView style={this.styles.blurView} {...blurOptions}/>}
312312
{this.renderContent()}
313313
</AnimatableView>
314314
</View>

src/screensComponents/modal/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import _ from 'lodash';
22
import PropTypes from 'prop-types';
33
import React from 'react';
44
import {StyleSheet, Modal as RNModal, TouchableWithoutFeedback} from 'react-native';
5-
// import {BlurView} from '@react-native-community/blur';
6-
// import {Constants} from '../../helpers';
5+
import {BlurView} from '@react-native-community/blur';
6+
import {Constants} from '../../helpers';
77
import {BaseComponent} from '../../commons';
88
import TopBar from './TopBar';
99
import View from '../../components/view';
@@ -55,8 +55,8 @@ export default class Modal extends BaseComponent {
5555
}
5656

5757
render() {
58-
const {blurView, /* enableModalBlur, */ visible, ...others} = this.props;
59-
const defaultContainer = /* enableModalBlur && Constants.isIOS ? BlurView : */View;
58+
const {blurView, enableModalBlur, visible, ...others} = this.props;
59+
const defaultContainer = enableModalBlur && Constants.isIOS ? BlurView : View;
6060
const Container = blurView ? blurView : defaultContainer;
6161

6262
return (

0 commit comments

Comments
 (0)