ejoy-react-native-blur
Advanced tools
Comparing version 3.2.4 to 3.2.5
{ | ||
"name": "ejoy-react-native-blur", | ||
"version": "3.2.4", | ||
"version": "3.2.5", | ||
"description": "React Native Blur component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,25 +25,33 @@ import React from 'react'; | ||
function BlurView({ blurType, disabled, style }) { | ||
const iStyle = disabled ? (dStyles[blurType] || dStyles.xlight) | ||
: (styles[blurType] || styles.xlight); | ||
export default class BlurView extends React.PureComponent { | ||
return ( | ||
<View | ||
{...this.props} | ||
style={[ iStyle, style ]} | ||
/> | ||
); | ||
static propTypes = { | ||
blurType: PropTypes.oneOf([ 'dark', 'light', 'xlight' ]), | ||
disabled: PropTypes.bool, | ||
style: PropTypes.any, | ||
}; | ||
static defaultProps = { | ||
blurType: 'dark', | ||
disabled: true, | ||
}; | ||
render(){ | ||
const { blurType, disabled, style } = this.props; | ||
const iStyle = disabled ? (dStyles[blurType] || dStyles.xlight) | ||
: (styles[blurType] || styles.xlight); | ||
return ( | ||
<View | ||
{...this.props} | ||
style={[ iStyle, style ]} | ||
/> | ||
); | ||
} | ||
} | ||
BlurView.propTypes = { | ||
blurType: PropTypes.oneOf([ 'dark', 'light', 'xlight' ]), | ||
disabled: PropTypes.bool, | ||
style: PropTypes.any, | ||
}; | ||
BlurView.defaultProps = { | ||
blurType: 'dark', | ||
disabled: true, | ||
}; | ||
export default BlurView; |
import React from 'react'; | ||
import ReactNative from 'react-native'; | ||
class VibrancyView extends React.Component { | ||
render() { | ||
console.error("VibrancyView is not implemented on Android"); | ||
class VibrancyView extends ReactNative.View { | ||
constructor(props){ | ||
super(props) | ||
console.warn("VibrancyView is not implemented on Android"); | ||
} | ||
} | ||
module.exports = VibrancyView |
44483
138
24