Disable BlurView on android (#2351)
* A couple of small tweaks * Force the UI to re-render by setting a key * Disable to blurview on android * Remove hackfix
This commit is contained in:
parent
705f9b61ef
commit
0d960c58ba
3 changed files with 35 additions and 4 deletions
30
src/view/com/util/BlurView.android.tsx
Normal file
30
src/view/com/util/BlurView.android.tsx
Normal file
|
@ -0,0 +1,30 @@
|
|||
import React from 'react'
|
||||
import {StyleSheet, View, ViewProps} from 'react-native'
|
||||
import {addStyle} from 'lib/styles'
|
||||
|
||||
type BlurViewProps = ViewProps & {
|
||||
blurType?: 'dark' | 'light'
|
||||
blurAmount?: number
|
||||
}
|
||||
|
||||
export const BlurView = ({
|
||||
style,
|
||||
blurType,
|
||||
...props
|
||||
}: React.PropsWithChildren<BlurViewProps>) => {
|
||||
if (blurType === 'dark') {
|
||||
style = addStyle(style, styles.dark)
|
||||
} else {
|
||||
style = addStyle(style, styles.light)
|
||||
}
|
||||
return <View style={style} {...props} />
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
dark: {
|
||||
backgroundColor: '#0008',
|
||||
},
|
||||
light: {
|
||||
backgroundColor: '#fff8',
|
||||
},
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue