diff --git a/components/PlatformBlurView.tsx b/components/PlatformBlurView.tsx new file mode 100644 index 00000000..77ff0420 --- /dev/null +++ b/components/PlatformBlurView.tsx @@ -0,0 +1,35 @@ +import { BlurView } from "expo-blur"; +import React from "react"; +import { Platform, View, ViewProps } from "react-native"; +interface Props extends ViewProps { + blurAmount?: number; + blurType?: "light" | "dark" | "xlight"; +} + +/** + * BlurView for iOS and simple View for Android + */ +export const PlatformBlurView: React.FC = ({ + blurAmount = 100, + blurType = "light", + style, + children, + ...props +}) => { + if (Platform.OS === "ios") { + return ( + + {children} + + ); + } + + return ( + + {children} + + ); +};