diff options
Diffstat (limited to 'src/view/com/util/BlurView.web.tsx')
-rw-r--r-- | src/view/com/util/BlurView.web.tsx | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/view/com/util/BlurView.web.tsx b/src/view/com/util/BlurView.web.tsx deleted file mode 100644 index d1fb4665f..000000000 --- a/src/view/com/util/BlurView.web.tsx +++ /dev/null @@ -1,35 +0,0 @@ -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, - blurAmount, - ...props -}: React.PropsWithChildren<BlurViewProps>) => { - // @ts-ignore using an RNW-specific attribute here -prf - let blur = `blur(${blurAmount || 10}px` - // @ts-ignore using an RNW-specific attribute here -prf - style = addStyle(style, {backdropFilter: blur, WebkitBackdropFilter: blur}) - 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', - }, -}) |